To start the server run
$ npm start
Note: This will run a server for development environment.
For information on deploying express application to production server and learn best practices refer this.
This directory has 2 files.
- logger.js exports a winston object which we use for logging. You should edit logger.js to write your config for the logs.
- morgan.js exports a pre-configured morgan object to log using stream to winston object. It is used to intercept the HTTP request and log the request and response details. For more details visit the official page for morgan.
Directory for defining routes. I don't think this need more explanation.
- If on Linux running the following command add ./node_modules/.bin to the path.
$ source ./activate
By doing so we can use the commands installed with packages using the terminal.
This won't be required in many IDEs like Webstorm but I thought it will be a good idea to include it.
- standard.js has been added as the default linting and styling tool
$ npm run lint
Fixes whatever can be fixed. Above command logs out the errors which it couldn't fix.
$ npm test
- nyc is used as the default coverage tool. Use:
$ npm run coverage
- The master contains code for an HTTP server. Checkout the branch https for the HTTP server. Replace the self-signed certificates in the certs with your SSL certificates.
Level up every day