-
Notifications
You must be signed in to change notification settings - Fork 50
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
Work on serve-static properly #81
Comments
On top of that, it would be cool if I could intercept and modify file contents, which will only serve the modified file, and not apply changes to the real file. Something like |
@renhiyama I'm facing the same issue. Is there any workaround? I tried serving static files from the public folder but that didn't work: app.use('/static/**', serveStatic({ root: './public/' })); |
@ryands17 I use hono w/ reejs + packit. Since packit is a code generator, I have configured it to read dir, get appropriate content type header and save the data as a json array to the final code. Then packit is configured to write a for loop on that array which registers route per file separately. |
Any update or workaround to support staticWebsite or single page application using serveStatic |
just keep it normal, like dont serve index.html unless explicitly set to...
as of
@hono/[email protected]
, this code still doesnt work properly ...This above code doesnt seve files inside
.reejs
folder properly, servesindex.html
when didnt ask to, and neitherfile
option seems to work for me.While it sounds reasonable to have served index.html automatically, I would suggest making that opt-in.
Like:
would just do the job.
The text was updated successfully, but these errors were encountered: