File tree 1 file changed +5
-5
lines changed
src/routes/solid-start/building-your-application 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ title: "API routes"
4
4
5
5
While Server Functions can be a good way to write server-side code for data needed by your UI, sometimes you need to expose API routes.
6
6
Some reasons for wanting API Routes include:
7
- - there are additional clients that want to share this logic.
8
- - exposing a GraphQL or tRPC endpoint.
9
- - exposing a public facing REST API.
10
- - writing webhooks or auth callback handlers for OAuth.
11
- - having URLs not serving HTML, but other kinds of documents like PDFs or images.
7
+ - There are additional clients that want to share this logic.
8
+ - Exposing a GraphQL or tRPC endpoint.
9
+ - Exposing a public facing REST API.
10
+ - Writing webhooks or auth callback handlers for OAuth.
11
+ - Having URLs not serving HTML, but other kinds of documents like PDFs or images.
12
12
13
13
For these use cases, SolidStart provides a way to write these routes in a way that is easy to understand and maintain.
14
14
API routes are just similar to other routes and follow the same filename conventions as [ UI Routes] ( /solid-start/building-your-application/routing ) .
You can’t perform that action at this time.
0 commit comments