This module is an express middleware that exposes endpoints that somewhat mimic the behavior of [Spring Boot Actuator](https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-actuator)
npm install express-actuator-endpointsThis module is an express middleware that exposes endpoints that somewhat mimic the behavior of Spring Boot Actuator
All responses are in JSON format.
``sh`
npm i --S express-actuator-endpoints
`js
import express from "express";
import actuator from "express-actuator-endpoints";
const app = express();
app.use(actuator());
`
| Endpoint | Response |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| /health | Responds with a status of "UP" and a default description |process.env
| /info | Responds with the last git commit info when used in conjunction with node-git-info-json |
| /env | Responds with |
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:
`js
import express from "express";
import actuator from "express-actuator-endpoints";
const actuatorConfig = {
info: {
gitInfo: "Some git info"
},
health: {
description: "Jim's API"
}
};
const app = express();
app.use(actuator(actuatorConfig));
``