docs: update endpoints to use file-routing approach (#5397)
- Move the original guides for creating endpoints and middlewares to sub-sections in the Endpoints category. - Replace existing guides for endpoints and middlewares with the new approach. - Update all endpoints-related snippets across docs to use this new approach.
This commit is contained in:
@@ -136,9 +136,9 @@ This directory holds all Medusa admin customizations. The main subdirectories of
|
||||
|
||||
### api
|
||||
|
||||
This directory holds all custom endpoints. You can create as many subdirectories and files that hold endpoint definitions, but only endpoints exported by the `index.ts` file are registered in the Medusa backend.
|
||||
This directory holds all custom API Routes, which are defined in `route.ts` or `route.js` files. These files can be created in sub-directories of the `api` directory based on the API Route's path.
|
||||
|
||||
**Read more:** [Endpoints](../endpoints/overview.mdx)
|
||||
**Read more:** [API Routes](../api-routes/overview.mdx)
|
||||
|
||||
### loaders
|
||||
|
||||
|
||||
Reference in New Issue
Block a user