Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.63 KB

File metadata and controls

56 lines (37 loc) · 1.63 KB

Quickstart RESTful node.js application

Commands

Development

During development it is recommended to start two terminals with following commands:

Production

On production environment start application with supervisor:

  • npm start - same as supervisor app/start.js

Switching environments

In order to change application environment use:

  • Windows:

      set NODE_ENV=production
      supervisor app/start.js
    
  • Unix/Linux:

      NODE_ENV=production supervisor app/start.js
    

Functionalities

  • Everything what is needed for advanced rest api: routing, content negotiation, error handling, versioning.
  • Configuration per environment
  • Logger per environemnt
  • Unit tests
  • Integration tests

Dependencies

Runtime modules:

Testing modules:

  • Mocha - test framework
  • Chai - assertion mechanisms
  • Sinon - mocking framework
  • Blanket - code coverage
  • Supertest - HTTP assertions designed for express - useful for integration tests