nitro
nitro copied to clipboard
Not serving index.html
Environment
nitropack: 0.4.4 node: 16.13.2 no config
Reproduction
- create the folder structure seen in the picture
- npx nitropack build
- node .output/server/index.mjs
- navigate to localhost:3000
Describe the bug
The built server is not serving index.html on the baseurl. It is trying to look for assets "/" and "//index.html", when it should look for "/" and "/index.html" instead. There is an extra slash.
The issue shows in the attached picture.
If this is intended, is there a way to configure nitro to serve "/index.html" for all unhandled routes?
I'm looking for a behavior like:
for (const _id of [id, id + "/index.html", "/index.html"]) {
Additional context
No response
Logs
No response