healthy-endpoint
Koa middleware that adds health and informational properties to ctx.body
Usage
const Koa = require('koa');
const apiHealthy = require('@nthlytics/api-healthy);
const app = new Koa();
koa.use(apiHealthy())
Properties
The apiHealthy middleware function will add the following properties to ctx.body
- isHealthy: true
- serviceVersion: value of process.env.npm_package_version
- serviceName: value of process.env.npm_package_name