🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@starefossen/express-health

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@starefossen/express-health

Health checking route for Express.js applications

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@starefossen/express-health

Build status Codacy grade Codacy coverage NPM downloads NPM version Node version Dependency status

Health checking route for Express.js applications.

Install

$ npm install @starefossen/express-health --save

Usage

const healthCheck = require('@starefossen/express-health');

### Single Check

```js
app.get('/healthCheck', healthCheck({
  name: 'Database',
  check: cb => {
    // get status from database
    db.getStatus(cb);
  },
}));

Multiple Checks

app.get('/healthChecks', healthCheck([{
  name: 'MongoDB',
  check: cb => {
    // get status from MongoDB database
    mongo.db.stats(cb);
  },
},{
  name: 'Redis',
  check: cb => {
    // get status from Redis cache
    redis.info(cb);
  },
}]));

MIT Licensed

Keywords

ES6

FAQs

Package last updated on 13 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts