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
StaticMiddleware(path) precedence #56
Comments
I would use a front end proxy (something like Nginx, HAroxy) to do static file serving instead. If you are looking for a more feature-rich framework you should have a go at Beego or Revel. Suggest close. |
my point is: i just don't want to type: for development it would be great to have GO serving all files. later it would, as you advice, a good idea to use a reverse proxy for that purpose. thanks for your help so far but i think that either i'm using the gocraft/web wrongly or there is a bug in the StaticMiddleware |
@qknight Instead of using a middleware to serve your static files for development purposes, couldn't you write an implementation of |
yes, i could write my own code but isn't StaticMiddleware for that? |
Are you actually saying that doing |
GET localhost:3000 actually returns (on chromium):
using curl i see this:
|
according to: i was doing it wrong!
was changed to:
which makes 'http://localhost:3000' work! thanks everyone |
Using this code:
One can not just open: localhost:3000 in the browser because one is then always matched against the StaticMiddleware. But I would like that localhost:3000 opens the Main page instead of having to type, say localhost:3000/index.html every time.
Am I missing something here?
The text was updated successfully, but these errors were encountered: