Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including healthcheck-ping with all npm packages installed. Try it out:

var healthcheckPing = require("healthcheck-ping")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

healthcheck-ping v2.0.1

Express middleware exposing a health check endpoint

NPM Version Build Status Coverage Status Dependencies


:ambulance: 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"


$ npm install healthcheck-ping --save


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:



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free