@includable/middleware-health
v1.0.1
Published
Health check and metrics middleware.
Downloads
3
Maintainers
Readme
middleware-health
This package adds a /health
endpoint that can be used for status checks and lists some request metrics:
{
"status": 200,
"friendlyName": "OK",
"environment": "production",
"uptime": 80374,
"requests": 208,
"responseTime": 0.001
}
Installation
npm i @includable/middleware-health
Usage
const express = require('express')
const health = require('@includable/middleware-health')
app.use(health())
app.listen(process.env.PORT || 3000, () => console.log(`Example app running.`))