1.0.5 • Published 5 years ago

express-server-cli v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Express API Server Boiler Plate

How to create your new Express API server app:

run this command to install the cli globally in your machine:

npm install express-server-cli -g

Now go to the dir you want your app to be in then run this command:

express-server-cli create <dirname>

Do not put braces and name should be all lowercase without any space(use - or _ instead)

Now you will have an app in the dir you mentioned in the cmd above

Starting Express server

just run:

npm install
npm start

I use nodemon for faster development:

npm install nodemon -g

if you are using nodemon:

npm run dev

CLI Features

Create a Module

This feature will create a module and will save your time of creating new files with this cmd:

express-server-cli create-module <modulename>

App Features

When you will generate a new app. you will have bunch of configured and ready to be used libraries in your lib folder which are:

Bcrypt

Bcrypt module is commonly used for generating password hash. However the module is congifured to be used anywhere a/c to requirements.

Email

Email is a ready to use module for sending verification/confirmation emails to users.

Using: Node Mailer and Sendgrid

JWT

JSON Web Token configured and ready to use for generating API access tokens or anything else.

Using: JWT

Logger

Application logger configured to log info in app.log file.

NOTE: Make sure to create a app.log file in the production environment only.

Using: Bunyan

Multer

Multer is a file uploader module. Its provides form data configuration for express app.

Using: Multer

SMS

Configured and ready to use SMS module for sending verification/confirmation or any other SMS to users.

Using: Twilio

Scripts

Creating super admin and making db backup everyday are done through scripts. Which are already written and ready to use for you:

For Super Admin:

npm run create-admin

For Everyday DB Backup:

npm run db_backup_cron
1.0.5

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago