fuzzybaird / node-example-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-example-service

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.

Automated testing

Module: jest

To execute the automated tests, run npm run test.

TODO How to build tests

Code analysis

Module: eslint

To lint the project and fix any problems found, run npm run lint.

Configuration

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.

Debugging

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.

Monitoring

Canary endpoint

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

Outgoing requests

Modules: request, request-promise-native

See /src/xkcd.controller.js for a simple example.

REST endpoints

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.

About


Languages

Language:JavaScript 60.5%Language:Smarty 23.2%Language:Shell 8.4%Language:Dockerfile 7.9%