healthcheck-ping
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

NPM Version Build Status Coverage Status Dependencies

healthcheck-ping

🚑 Express middleware that exposes the health state.

This middleware can be used in any express application to provide a simple health check endpoint. The default endpoint is "_health" but you can provide a different endpoint name if you want.

The endpoint returns a static json response:

{
    "status": "OK"
}

Installation

$ npm install healthcheck-ping --save

Usage

var createHealthcheckMiddleware = require('healthcheck-ping');
 
var server = express();
 
server.use(createHealthcheckMiddleware()); // mounted as /_health

If you want the healthcheck to be available on a custom endpoint you can do so:

server.use(createHealthcheckMiddleware('foobar'));

Package Sidebar

Install

npm i healthcheck-ping

Weekly Downloads

268

Version

2.0.1

License

MIT

Unpacked Size

7.54 kB

Total Files

7

Last publish

Collaborators

  • anistal
  • holidaycheck-owner
  • lo1tuma