mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-22 16:39:58 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
d9ee37a31e
commit
eb61fe1396
@ -2,7 +2,7 @@
|
|||||||
description: Using server directory to create middlewares, plugins and API easily.
|
description: Using server directory to create middlewares, plugins and API easily.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Server Directory
|
# Server Directory
|
||||||
|
|
||||||
Nuxt scans files under server directory to create middlewares, plugins and API routes to create features to use inside components or pages.
|
Nuxt scans files under server directory to create middlewares, plugins and API routes to create features to use inside components or pages.
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ const {data} = await useFetch('/api/hello')
|
|||||||
|
|
||||||
This server route will return a data object that contains an object with content of `{greetings: 'traveler'}`.
|
This server route will return a data object that contains an object with content of `{greetings: 'traveler'}`.
|
||||||
|
|
||||||
Server route file will automatically match with `GET` method and it can be changed by adding method names to file name such as: `.post`, `.put`, `.delete`.
|
Server route file will automatically match with `GET` method and it can be changed by adding method names to file name such as: `.post`, `.put`, `.delete`.
|
||||||
Routes may accept parameters, body and query parameters to get some values.
|
Routes may accept parameters, body and query parameters to get some values.
|
||||||
|
|
||||||
:ReadMore{link="/docs/guide/directory-structure/server#matching-route-parameters"}
|
:ReadMore{link="/docs/guide/directory-structure/server#matching-route-parameters"}
|
||||||
|
Loading…
Reference in New Issue
Block a user