Create new route

Note: If your application is still running, press CTRL+C to stop it before calling the command

Create route with name `users`

nodpi r users 

Answer the prompts as follows:

? Create route with CRUD function? (Use arrow keys)
❯ Yes 
  No

Users route will be created with following folder structure

Route structure

Copy paste following route in your main server file in api routes block

You can also create a route by providing folder name as follows

Last updated

Was this helpful?