1.3.0 • Published 6 months ago

express-bp v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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.

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:

OptionsDescription
-t, --templateSpecify the template expressjs, expressts
-p, --portSpecify the port, default 8081
-d, --databaseSpecify the database mongo, dynamo, none
-dn, --databaseNameAssign 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

FeaturesDescription
Boiler Plate TemplatesWe supports Express-JS and Express-TS tempaltes
DatabaseMongoDB
Module Creationcontroller, router, model and helper
Change PortCan 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.

1.3.0

6 months ago

1.2.5

6 months ago

1.2.4

6 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago