chairo-health-check
Add a simple health check to your chairo
/seneca
service. Includes the ability to check which version of your service is running.
Usage
const Chairo = const HealthCheck = const name version = const HealthCheckPlugin = register: HealthCheck options: name // Optional. Default: $npm_package_name version // Optional. Default: $npm_package_version action: // Optional. Default shown here role: 'health' cmd: 'check' promise: Promise server
Example result:
Options
The following configuration options are available:
name
- The name to be returned from the health check. Default:process.env.npm_package_name
version
- The version to be returned from the health check. Default:process.env.npm_package_version
action
- The pattern used to call the health check. Default:{ role: 'health', cmd: 'check }
promise
- A promise to be resolved and the returned value added to apromise
property on the result message.