1.0.1 • Published 6 years ago

@nthlytics/healthy-endpoint v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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