nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Not serving index.html

Open nitedani opened this issue 2 years ago • 0 comments

Environment

nitropack: 0.4.4 node: 16.13.2 no config

Reproduction

  1. create the folder structure seen in the picture
  2. npx nitropack build
  3. node .output/server/index.mjs
  4. 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. image image

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

nitedani avatar May 16 '22 03:05 nitedani