hapi-heartbeat2

1.0.1 • Public • Published

Hapi Heartbeat2

Build Status NPM version Dependencies

Shared code for the heartbeat endpoint.

Installation:

npm install hapi-heartbeat2

Usage:

var server = hapi.createServer();

server.pack.require("hapi-heartbeat2",
  {
    liveness: '/my/api/123',
    route: '/heartbeat' (optional: default to /heartbeat)
    headers: {
    // optional headers to apply when making the liveness check
      'accept-language': 'en-US'
    },
  },
  function (err){
    if(err){
      throw err;
    }
  }
);

Response Codes:

  • 200
  • 403
  • 503

Notes:

  • Supports pack servers as well as single instances
  • Supports hapi v5+

/hapi-heartbeat2/

    Package Sidebar

    Install

    npm i hapi-heartbeat2

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • codemouse