express-service-health
1.0.1 • Public • Published express-service-health
express middleware to provide a simple health check endpoint for a service
api
const health = require('express-service-health')
health(express.Router[, endpoint])
health
is the default value for the endpoint
example
const health = require('express-service-health')
const express = require('express')
const service = express()
const router = express.Router()
router.get(
'/hello-world',
(req, res) => { res.send('hello world') }
)
service.use(serviceHealth(express.Router))
service.use('/', router)
request('some uri')
.get('/health')
.end((err, res) => {
})
ISC License (ISC)
/express-service-health/
//
Package Sidebar
Install
npm i express-service-health
Weekly Downloads