@nthlytics/healthy-endpoint

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i @nthlytics/healthy-endpoint

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.14 kB

Total Files

8

Last publish

Collaborators

  • nthlytics