-
-
Notifications
You must be signed in to change notification settings - Fork 598
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
Static file serving: redirect / to /index.html #1435
Comments
Do you get an error stack trace? The 500 error means that something crashed. It would be useful to see this stacktrace if you have it. |
yes ofc, sorry for not providing it in the original post.
|
Thanks. I believe the problem is that you are mapping
Give that a try and let me know if that solves the problem. |
You are absolutely right Miguel, adding the trailing slash solves my problem. Sorry for wasting your time with such an oversight on my end. Appreciate the help :) |
Pain point
I have a folder of static files that I serve:
It's frustrating that I have to access it via the URL pattern
localhost:5000/index.html
Desired solution
If serving an entire folder I would like the route to automatically point to index.html, while still being able to resolve all other files in the build directory
Alternatives
The alternative is running something like Flask, FastAPI, Django etc. But using just socketio and running programatically with uvicorn suits my needs well except for this one point.
Logs
I guess this isn't so relevant as its expected but I get the following error when i try to access my static files at
localhost:5000/
The text was updated successfully, but these errors were encountered: