express-bp v1.3.0
Express Boiler Plate CLI Tool (express-bp)
Kickstart your ExpressJS projects with ease using express-bp, a powerful boilerplate generator designed to streamline the setup process and accelerate your development workflow. This npm package provides a robust foundation for Express applications, complete with pre-configured database settings and an automated component creation system.
Express bp supports on MacOS, windows and Linux.
- Create an Express boiler plate - How to create new Express app.
- Create Module - How to create Modules.
- Change Port - How to change PORT.
Installation
You should install it globally.
With NPM
npm install -g express-bp
With Yarn
yarn global add express-bp
Create an Express boiler plate
Your system will need to have Node 16.16.0 or later version.
To create an express app, you can choose one of the following method.
Through Prompt
express-bp create-app
This command will prompt to multiple options for configuring express app and database.
Through Command
express-bp create-app -t <templateName> -p <port> -d <database-type> -dn <database-name> <app name>
The command options are:
Options | Description |
---|---|
-t, --template | Specify the template expressjs, expressts |
-p, --port | Specify the port, default 8081 |
-d, --database | Specify the database mongo, dynamo, none |
-dn, --databaseName | Assign a name for database |
you can use --help command for knows this options and commands:
express-bp --help
Example
express-bp create-app -t expressjs -p 3040 -d mongo -dn testdb app
After running the above commad it will create a project directory 'app' inside current folder. Inside the directory You can see the Express Boiler Plate.
app
├── node_modules
├── src
| ├── config
| ├── controller
| ├── helper
| ├── model
| ├── router
| ├── utils
| └── app.js
├── .env
├── .gitignore
├── package-lock.json
└── package.json
Once the installation is done, open your project folder:
cd app
Applciation created.
Run Application
For running application
Using nodemon
npm run dev
or
yarn run dev
Using node
npm start
or
yarn start
Create Module
You can automatically create modules. Which means you can create Controller, router, model and helper templates using command.
command for creating module
express-bp create-module <module-name>
For example;
express-bp create-module user
It will create user.controller, user.router, user.model and user.helper files with basic crud api.
Change Port
You can change the port of the application.
express-bp change-port < port >
For Example
express-bp change-port 3040
About Express BP CLI Tool
Features | Description |
---|---|
Boiler Plate Templates | We supports Express-JS and Express-TS tempaltes |
Database | MongoDB |
Module Creation | controller, router, model and helper |
Change Port | Can change the PORT of the application |
DB Configuration
Express automaticaly configure db.
MongoDB
For mongo as the database your system must contains mongod or If you want to run Mongodb Atlas just change the Uri in db.shared.js file as the mongodb atlas connection string
License
Express boiler plate (express-bp) is open source software licenced as MIT.