1.0.1 • Published 5 years ago

@includable/middleware-health v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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.`))