Skip to content

Commit

Permalink
docs(routing): add nested example (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
geromegrignon authored Jul 22, 2024
1 parent 538da2c commit 79c58b9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/1.guide/2.routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ routes/
nitro.config.ts
```

You can nest routes by creating subdirectories.

```md
routes/
communities/
index.get.ts
index.post.ts
[id]/
index.get.ts
index.post.ts
hello.get.ts
hello.post.ts
```

::note
If you are using [Nuxt](https://nuxt.com), move the `server/api/` and `server/routes/` instead.
::
Expand Down

0 comments on commit 79c58b9

Please sign in to comment.