Express Actuator Endpoints
This module is an express middleware that exposes endpoints that somewhat mimic the behavior of Spring Boot Actuator
All responses are in JSON format.
Installation
npm i --S express-actuator-endpoints
Usage
;; const app = ;app;
Endpoints
Endpoint | Response |
---|---|
/health | Responds with a status of "UP" and a default description |
/info | Responds with the last git commit info when used in conjunction with node-git-info-json |
/env | Responds with process.env |
Configuration
You can pass a configuration object to this middleware and the routes will serve any information you pass, along with the defaults. See example below:
;; const actuatorConfig = info: gitInfo: "Some git info" health: description: "Jim's API" ; const app = ;app;