Awesome Open Source
Awesome Open Source

Express ES2017 REST API Boilerplate

PRs Welcome npm version Build Status Coverage Status

Boilerplate/Generator/Starter Project for building RESTful APIs and microservices using Node.js, Express and MongoDB


  • No transpilers, just vanilla javascript
  • ES2017 latest features like Async/Await
  • CORS enabled
  • Uses yarn
  • Express + MongoDB (Mongoose)
  • Consistent coding styles with editorconfig
  • Docker support
  • Uses helmet to set some HTTP headers for security
  • Load environment variables from .env files with dotenv
  • Request validation with joi
  • Gzip compression with compression
  • Linting with eslint
  • Tests with mocha, chai and sinon
  • Code coverage with istanbul and coveralls
  • Git hooks with husky
  • Logging with morgan
  • Authentication and Authorization with passport
  • API documentation generation with apidoc
  • Continuous integration support with travisCI
  • Monitoring with pm2


Getting Started

Clone the repo and make it yours:

git clone --depth 1
cd express-rest-es2017-boilerplate
rm -rf .git

Install dependencies:


Set environment variables:

cp .env.example .env

Running Locally

yarn dev

Running in Production

yarn start


# lint code with ESLint
yarn lint

# try to fix ESLint errors
yarn lint:fix

# lint and watch for changes
yarn lint:watch


# run all tests with Mocha
yarn test

# run unit tests
yarn test:unit

# run integration tests
yarn test:integration

# run all tests and watch for changes
yarn test:watch

# open nyc test coverage reports
yarn coverage


# run lint and tests
yarn validate


# show logs in production
pm2 logs


# generate and open api documentation
yarn docs


# run container locally
yarn docker:dev

# run container in production
yarn docker:prod

# run tests
yarn docker:test


Set your server ip:


Replace my Docker username with yours:


Run deploy script:

yarn deploy




MIT License - Daniel Sousa

Alternatives To Express Rest Boilerplate
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,094,037
Docker (98,252
Express (31,173
Mongodb (30,603
Rest (29,240
Rest Api (16,922
Microservices (12,159
Mongoose (7,084
Express Boilerplate (41
Es2021 (6