Awesome Open Source
Awesome Open Source

Express Mongo JWT Boilerplate Build Status

Installation

  • Install NodeJS, MongoDB
  • Install npm or yarn
  • Rename .env.example to .env
  • Fulfill .env data
  • Start MongoDB
  • Run yarn run dev or npm run dev
  • Check http://localhost:3000/api/status to see it works

With Docker

  • Make sure you have installed Docker and Docker Compose
  • Just run docker-compose up to start the server

Configuration

Name Description Example
NODE_ENV Environment for node js "dev", "prod", "test"
APP Name of the application My cool express app
PORT Port to run the application (if you run in heroku this will setup automatically) 3000
HOSTNAME Host name for running the application http://localhost:3000
APP_SECRET Secret for running app. Use a strong hash in production and make sure to rotate it ddd36434-80fe-4f18-b3b6-e645697f7b84
MONGOURI MongoDB connection URI mongodb://localhost:27017/yourapp
MONGOTESTURI MongoDB connection URI for testing mongodb://localhost:27017/test-app
TRANSPORTER_HOST Mail server host smtp.mymailer.com
TRANSPORTER_PORT Mail server port 2525
TRANSPORTER_USERNAME Mail server username harrypotter
TRANSPORTER_PASSWORD Mail server password alohomora

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,532,221
Nodejs (55,135
Hacktoberfest (37,958
Api (22,617
Mongodb (14,576
Node (12,888
Express (11,545
Expressjs (7,371
Boilerplate (5,597
Mongoose (4,229
Jwt (3,631
Jwt Authentication (1,505
Mongo (897
Auth (880
Passport (743
Jwt Token (564
Boilerplate Template (510
Mongoosejs (258
Related Projects