Provides endpoints to help you monitor and manage your application when it's pushed to production.

Usage no npm install needed!

<script type="module">
  import expressActuator from '';


Express Actuator

npm version Build Status Coverage Status Known Vulnerabilities Dependencies Status npm

This middleware creates a series of endpoints to help you monitor and manage your application when it's pushed to production. It's useful when you run your application on kubernetes and you are in need of endpoints for readiness/liveness probe.

It is based on Spring Boot Actuator and the healthcheck-ping module by Mathias Schreck.

Table of Contents


ID Description
info Displays application information.
metrics Shows metrics information for the current application.
health Shows application health information.


$ npm install --save express-actuator


$ npm install --save-dev @types/express-actuator


const actuator = require('express-actuator');
const app = express();


Configuring Actuator

All defined options are optional:

const options = {
    basePath: '/management', // It will set /management/info instead of /info
    infoGitMode: 'simple', // the amount of git information you want to expose, 'simple' or 'full',
    infoBuildOptions: null, // extra information you want to expose in the build object. Requires an object.
    infoDateFormat: null, // by default, git.commit.time will show as is defined in If infoDateFormat is defined, moment will format git.commit.time. See
    customEndpoints: [] // array of custom endpoints


Custom Endpoints

You can add your own validations using the customEndpoints option:

const options = {
    customEndpoints: [
            id: 'dependecies', // used as endpoint /dependencies or ${basePath}/dependencies
            controller: (req, res) => { // Controller to be called when accessing this endpoint
                // Your custom code here



  1. If you call your custom endpoint info it WILL override the default info.
  2. If you provide basePath, your id will be available as ${basePath}/${id}, otherwise, just /${id}.
  3. Consider lightweight code being processed by your endpoint controller or it will compete with your main application.

Deprecated mode

To have backward compatibility with previous versions (<= 1.2.0) the legacy way is still available:

app.use(actuator('/management')); // It will set /management/info instead of /info

IMPORTANT: Deprecated mode will be removed in the next major version.

Endpoints Examples


    "build": {
        "description": "This is my new app",
        "name": "MyApp",
        "version": "1.0.0"
    "git": {
        "branch": "master",
        "commit": {
            "id": "329a314",
            "time": "2016-11-18 08:16:39-0500"

IMPORTANT: To get this information the middleware have some sort of logic:

  1. When the express app is executed with node app.js or npm start the module will look for a file named package.json where the node command was launched.
  2. Git information will show only if exists a file where the app was launched. You can use node-git-info to generate this file.


    "mem": {
        "heapTotal": 14659584,
        "heapUsed": 10615072,
        "rss": 30093312
    "uptime": 19.797


  "status": "UP"

Application Information

Git Commit Information

The info endpoint has a feature to publish information about your git source code repository. If a file is available on your project path, the git.branch,, and git.commit.time properties are exposed.

TIP: You can use node-git-info to generate file on your project.

If you want to display the full git information (that is, the full content of, use the infoGitMode property, as follows:

const options = {
    infoGitMode: 'full'



Third-party contributions are welcome! 🙏🏼 See for step-by-step instructions.

If you need help or have a question, let me know via a GitHub issue.