Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    hapi-heartbeatpublic

    Hapi hearbeat

    Build Status NPM version Dependencies

    Shared code for the heartbeat endpoint.

    Installation:

    npm install hapi-heartbeat

    Usage:

    var server = hapi.createServer();
    
    server.pack.require("hapi-heartbeat",
      {
        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
    • 503

    Notes:

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

    install

    npm i hapi-heartbeat

    Downloadsweekly downloads

    10

    version

    3.0.0

    license

    MIT

    homepage

    github.com

    last publish

    collaborators

    • avatar
    • avatar
    • avatar
    • avatar