mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #2079 from aheruz/patch-1
doc: Update how-to-create-a-feature.mdx
This commit is contained in:
@@ -49,8 +49,8 @@ Server-related logic is handled in `/src/server`. To connect the service layer t
|
||||
|
||||
## Writing API Routes
|
||||
|
||||
1. To create a route component, run `npm generate:component`.
|
||||
1. To create a route component, run `npm run generate:component`.
|
||||
2. Select option 3, type the router name in dash-case, and provide the version number. This will generate a router file in `src/server/routes/v<version-number>/<router component name>`
|
||||
1. Implement your logic to connect with the service layer as needed.
|
||||
2. Import the router component in the version folder's index.ts. For instance, if it's in v1, import it in `v1/index.ts`.
|
||||
3. Finally, register it under the appropriate prefix for access.
|
||||
3. Finally, register it under the appropriate prefix for access.
|
||||
|
||||
Reference in New Issue
Block a user