https://github.com/hfreire/health-checkup
A health :heart: check facility to check the status :+1::-1: of your modules
https://github.com/hfreire/health-checkup
checkup github-actions health healthcheck microservice service
Last synced: 3 months ago
JSON representation
A health :heart: check facility to check the status :+1::-1: of your modules
- Host: GitHub
- URL: https://github.com/hfreire/health-checkup
- Owner: hfreire
- License: mit
- Created: 2016-10-29T11:35:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-07T08:24:57.000Z (9 months ago)
- Last Synced: 2025-02-27T15:05:17.717Z (3 months ago)
- Topics: checkup, github-actions, health, healthcheck, microservice, service
- Language: JavaScript
- Homepage:
- Size: 2.45 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# A health :heart: check facility to check the status :+1::-1: of your modules
[](https://github.com/hfreire/health-checkup/actions?workflow=ci)
[](https://coveralls.io/github/hfreire/health-checkup?branch=master)
[](https://snyk.io/test/github/hfreire/health-checkup)
[](https://github.com/hfreire/health-checkup/releases)
[](https://www.npmjs.com/package/health-checkup)
[](https://www.npmjs.com/package/health-checkup)> One function to check the health status of all your app modules.
### Features
* Cache :clock10: check results (able to set expiration time) :white_check_mark:
* Supports [Bluebird](https://github.com/petkaantonov/bluebird) :bird: promises :white_check_mark:### 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
```javascript
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
```javascript
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](https://paypal.me/hfreire/5). You can read the [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute with code.All donation proceedings will go to the [Sverige för UNHCR](https://sverigeforunhcr.se), a swedish partner of the [UNHCR - The UN Refugee Agency](http://www.unhcr.org), 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](https://github.com/hfreire/health-checkup) - A kickass :muscle: web server :scream_cat: with all the bells :bell: and whistles :sparkles:### License
Read the [license](./LICENSE.md) for permissions and limitations.