https://github.com/opentable/hapi-heartbeat
https://github.com/opentable/hapi-heartbeat
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/opentable/hapi-heartbeat
- Owner: opentable
- License: mit
- Created: 2014-11-11T15:38:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-16T08:49:41.000Z (over 8 years ago)
- Last Synced: 2024-04-14T09:05:29.053Z (about 1 year ago)
- Language: JavaScript
- Size: 128 KB
- Stars: 2
- Watchers: 21
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#Hapi hearbeat
[](https://travis-ci.org/opentable/hapi-heartbeat) [](http://badge.fury.io/js/hapi-heartbeat) 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
- 503Notes:
- Supports pack servers as well as single instances
- Supports hapi v5+