express-gen-cli
v1.0.4
Published
A CLI to generate Express controllers and models for MongoDB and SQL
Downloads
189
Maintainers
Readme
express-gen-cli
A CLI tool to generate Express controllers and models for MongoDB and SQL databases.
Features
- Generate Express controllers with standard CRUD functions.
- Create Sequelize models for SQL databases.
- Generate Mongoose models for MongoDB.
Installation
To install the package globally, use the following command:
npm install -g express-gen-cli
Usage
This CLI provides several commands for generating controllers and models. Below are the commands you can use:
Generate a Controller
To create a new controller, run the following command:
express-gen make:controller <controller-name>
Generate a Sequelize Model
To create a new Sequelize model, use:
express-gen make:model:sql <model-name>
Generate a Mongoose Model
To create a new Mongoose model, use:
express-gen make:model:mongo <model-name>
Example Commands
Here are examples of how to use the commands:
To generate a controller named UserController, run:
express-gen make:controller UserController
To generate a Sequelize model named User, run:
express-gen make:model:sql User
To generate a Mongoose model named User, run:
express-gen make:model:mongo User
Keywords
Express.js CLI
Generate Express Controllers
MongoDB Mongoose Models
SQL Sequelize Models
CRUD Express CLI
Express Generator CLI Tool
Express Models and Controllers
Node.js Express CLI Tool