-
Notifications
You must be signed in to change notification settings - Fork 570
Feature Request: gopherjs serve import/path #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Before trying to resolve this, need to first/at the same time resolve #268. |
jargv
added a commit
to jargv/gopherjs
that referenced
this issue
Mar 22, 2016
jargv
added a commit
to jargv/gopherjs
that referenced
this issue
Mar 24, 2016
jargv
added a commit
to jargv/gopherjs
that referenced
this issue
Mar 25, 2016
jargv
added a commit
to jargv/gopherjs
that referenced
this issue
Mar 26, 2016
neelance
added a commit
that referenced
this issue
Mar 31, 2016
Add optional root argument to gopherjs serve. Fixes #384
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's convenient that using
gopherjs serve
makes all of your GOPATH workspace available in browser via URLs like http://localhost:8080/import/path.However, some GopherJS projects use the URL as part of the input and may not expect an import path prefix, which would cause unintended issues for it.
I propose having a flag/value that can be passed to
gopherjs serve
that restricts serving to the specified import path (it doesn't have to be a valid Go package at that location, it's just a path).For example, if my frontend project is at
example.com/foo/bar
I want the URL to be http://localhost:8080/index.html, then I could use:Otherwise, if I used
gopherjs serve
as is now, I'd have to visit http://localhost:8080/example.com/foo/bar/index.html instead.The text was updated successfully, but these errors were encountered: