healthpoint
Easily expose your http server's health.
Example
var http = var healthpoint = var hp = http console
API
healthpoint([properties, check])
healthpoint([properties])
healthpoint([check])
healthpoint()
will return an http request handler function. healthpoint()
takes up to two optional arguments, properties
and check
.
Any key/value pairs on properties
will be exposed on the health check JSON. This is useful for adding things like your app's version.
check
is a function that will be called with a callback. If the callback is called with an error as its argument, the health check JSON will have a 500 statusCode and will display status: 'Error'
.
License
MIT