unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

docs(routing): add nested example #2625

Closed geromegrignon closed 2 months ago

geromegrignon commented 2 months ago

๐Ÿ”— Linked issue

2415

โ“ Type of change

๐Ÿ“š Description

Nesting routes with file based routing and using index files might be missing from an user's perspective. Id adds a more complete example of a structure.

๐Ÿ“ Checklist

geromegrignon commented 2 months ago

Partially unrelated, i'm unsure about this note:

image

Does it mean the folder structure for standalone nitro is /api and /routes, while prefixed by serverfor Nuxt apps? Because by creating a standalone nitro app nowadays, there is a root server folder too.

atinux commented 2 months ago

Does it mean the folder structure for standalone nitro is /api and /routes, while prefixed by serverfor Nuxt apps? Because by creating a standalone nitro app nowadays, there is a root server folder too.

Nice catch, I think we can now remove this alert in the docs.