Example Node microservice
This document has been automatically generated by the CHG CLI. It will describe the features available in the generated project. You should replace this with your own content that describes your project.
Module: jest
To execute the automated tests, run npm run test
.
TODO How to build tests
Module: eslint
To lint the project and fix any problems found, run npm run lint
.
Module: rc
Configuration is handled using the popular configuration loader package rc. You can use command-line parameters, environment variables, or configuration files to configure the application. See the rc documentation for details.
Module: nodemon
To run the project in debug mode, run npm run debug
. Remote debugging will be enabled and the app will restart when a source file changes.
The /
path is routed to a "canary" endpoint. This is intended to be used by monitoring services to ensure that the microservice is running, and provides useful information about it. You can customize what appears in the canary payload by modifying /src/canary.controller.js
.
TODO More monitoring
Modules: request, request-promise-native
See /src/xkcd.controller.js
for a simple example.
Module: express
Set up routes in /src/router.js
.
Configuration points:
http.path
(default'/'
): The path where the endpoints will be attached.http.port
(default =8080
): The port to listen on for web requests.