Git Product home page Git Product logo

express-starter-kit's Introduction

Express Starter Kit

Boilerplate for express web applications.

Features

  • Clustered mode, gracefull shudown or reload with PM2
  • Integration and unit tests (with mocha and supertest)
  • Test code coverage (istanbul and generated report
  • Generated documentation site from inline comments (jsDoc)
  • Auto generated swagger documentation from inline comments or from yaml files
  • Auto validation of content, params and query of your swagger documented endpoints
  • Asynchronous logging with multi transport support (winston) and promised logging
  • Debug synchronously with diff timing between outputs and namespaced (debug)
  • Additional express features for with promised api start and deferred middleware mounts
  • bluebird promises
  • Highly configurable and customizable with config for different enviroments
  • Modular approach to api mount allowing to serve diverse apis and unit test specific routers

Installation

Requirements

  • node: >5.10
  • npm: >3.3

Install dependencies

npm install [--production]

Install PM2 globally to manage your

node cluster

sudo npm install -g pm2

Create your local configuration file

You will need to add a local configuration file: ./config/local.yaml that will overwrite the configuration, check node-config for details on how the configuration is setup.

Launching the application

Cluster mode

pm2 start ecosystem.json -env <development|production>

Single node

NODE_ENV=<production|development> npm run start -s

Gracefull reload

For continuous integration with no downtime

pm2 gracefulReload app

Debug mode

npm run debug -s

mocha Testing and istanbul Coverage

npm run test -s

Coverage reports will be generated at ./coverage

eslint linting check

npm run lint -s

jsDoc Documentation

npm run docs -s

Documentation will be generated at ./docs

To inspect ./coverage and ./docs you may want to serve your local files. You can use http-server for that:

npm install -g http-server
http-server

express-starter-kit's People

Contributors

efmr avatar

Watchers

James Cloos avatar Tarun K. Singhal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.