health-middleware

0.2.0 • Public • Published

Node Health Middleware

Implementation Status

  • [x] Express/Connect
  • [ ] Sails.js
  • [ ] Restify

Installation

> npm i -S health-middleware

Usage

const healthcheck = require('health-middleware');

// If you need/want to add custom health checker functions:
healthcheck.addCheck('cassandra', 'timeout', async() => {
    // Faking data here, for brevity
    return {
        status : 'pass',
        metricValue: 250,
        metricUnit: "ms"
    };
});

// Add middleware to your Express app:
app.use(healthcheck());

License

MIT

/health-middleware/

    Package Sidebar

    Install

    npm i health-middleware

    Weekly Downloads

    3

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    11.2 kB

    Total Files

    20

    Last publish

    Collaborators

    • irakli