np-crud
v1.0.3
Published
`np-crud` is a CLI tool to create CRUD endpoints for a Nuxt.js and Prisma project.
Downloads
3
Readme
np-crud
np-crud
is a CLI tool to create CRUD endpoints for a Nuxt.js and Prisma project.
Installation
To install the dependencies, run:
npm install -g
Usage
To start the CLI, run:
np-crud
The CLI will prompt you to enter the model name, select the CRUD operations to create, and specify the path for the new model-CRUD.
Prompts
- Model Name: Enter the name of the model for which you want to create CRUD endpoints.
- CRUD Operations: Select the CRUD operations you want to create. The options are:
- Get all records
- Create a new record
- Delete a record
- Get a record by ID
- Update a record
- Path: Enter the path where the new model-CRUD files should be created. The default path is
/server/api
.
Example
npm start
Follow the prompts to generate the desired CRUD endpoints.
Dependencies
License
This project is licensed under the ISC License.