Skip to content
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

Docs: explain index files for server routing #2415

Open
1 task done
geromegrignon opened this issue May 5, 2024 · 2 comments
Open
1 task done

Docs: explain index files for server routing #2415

geromegrignon opened this issue May 5, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@geromegrignon
Copy link

Describe the feature

The server routes documentation is missing a basic folder structure scenario, implying you are familiar with file-based routing structure.

It doesn't explain you can prefix files with index, like index.get.ts.

It unlocks using a folder for crud operations like:

articles
  - index.get.ts
  - index.post.ts
  - index.delete.ts

Or being able to cover routes like /articles and /articles/upcoming.

articles
  index.get.ts
  upcoming
    index.get.ts

Additional information

  • Would you be willing to help implement this feature?
@geromegrignon geromegrignon changed the title Docs: explain index.page.ts files Docs: explain index files for server routing May 5, 2024
@pi0 pi0 added documentation Improvements or additions to documentation and removed pending triage labels May 7, 2024
@pi0
Copy link
Member

pi0 commented May 7, 2024

PR more than welcome to improve nitro docs 🙏🏼

@geromegrignon
Copy link
Author

Awesome I wanted to wait for feedback from the team before starting working on it. I'll land a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants