Package Exports
- express-actuator
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-actuator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Express Actuator
This middleware creates a series of endpoints to help you monitor and manage your application when it's pushed to production.
It is based on Spring Boot Actuator and the healthcheck-ping module by Mathias Schreck.
Endpoints
These are the endpoints available:
/info - Displays application information.
{ "build": { "description": "This is my new app", "name": "MyApp", "version": "1.0.0" }, "git": { "branch": "master", "commit": { "id": "329a314", "time": 1478086940000 } } }
IMPORTANT: To get this information the middleware have some sort of logic:
- If the express app is executed with
npm startit will get the data from process.env - If the express app is executed with
node app.jsthe module will look for a file named package.json where the node command was launched. - Git information will show only if exists a
git-propertiesfile where the app was launched. You can use node-git-info to generate this file.
- If the express app is executed with
/metrics - Shows ‘metrics’ information for the current application.
{ "mem": { "heapTotal": 14659584, "heapUsed": 10615072, "rss": 30093312 }, "uptime": 19.797 }
Installation
$ npm install express-actuator --saveUsage
var actuator = require('express-actuator');
var app = express();
app.use(actuator());If you want the endpoints to be available on a custom endpoint you can do so:
app.use(actuator('/management')); // It will set /management/info instead of /info