hfreire / health-checkup

A health :heart: check facility to check the status :+1::-1: of your modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A health ❀️ check facility to check the status πŸ‘πŸ‘Ž of your modules

Coverage Status Known Vulnerabilities Version Downloads

One function to check the health status of all your app modules.

Features

  • Cache πŸ•™ check results (able to set expiration time) βœ…
  • Supports Bluebird 🐦 promises βœ…

How to install

npm install health-checkup

How to use

Use it in your app

Set up health checks that should be performed during a checkup later on

const Health = require('health-checkup')

class MyService {
  constructor () {
    this._status = 'ok'

    Health.addCheck('my-service', () => {
      return Promise.try(() => {
        if (this._status !== 'ok') {
          throw new Error(`My Service status is ${this._status}`)
        }
      })
    })
  }
}

Perform a checkup and retrieve health report

Health.checkup()
  .then((report) => console.log(report))

How to contribute

You can contribute either with code (e.g., new features, bug fixes and documentation) or by donating 5 EUR. You can read the contributing guidelines for instructions on how to contribute with code.

All donation proceedings will go to the Sverige fΓΆr UNHCR, a swedish partner of the UNHCR - The UN Refugee Agency, a global organisation dedicated to saving lives, protecting rights and building a better future for refugees, forcibly displaced communities and stateless people.

Used by

  • health-checkup - A kickass πŸ’ͺ web server πŸ™€ with all the bells πŸ”” and whistles ✨

License

Read the license for permissions and limitations.

About

A health :heart: check facility to check the status :+1::-1: of your modules

License:MIT License


Languages

Language:JavaScript 100.0%