Registry / devops / express-cloudfoundry-actuator-middleware

express-cloudfoundry-actuator-middleware

JSON →
library1.8.0jsnpmunverified

Express middleware providing health and info endpoints for Cloud Foundry Apps Manager, inspired by Spring Boot Actuator. Current stable version is 1.8.0 (released May 2021), with maintenance-level updates addressing dependency vulnerabilities. Key differentiators: integrates natively with Cloud Foundry's Apps Manager UI, restricts endpoints to authenticated/authorized users, and works with the companion CLI to generate build info files. Compatible with Node 6+ (legacy engine requirement). Provides only health and info endpoints (no metrics, environment, or other Spring Boot actuator endpoints). Last release was over 3 years ago; no active development expected.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The package is CommonJS only; ESM import will fail.

const actuator = require('express-cloudfoundry-actuator-middleware')

actuator is a factory function that returns middleware; must be called.

app.use(actuator())

Options are booleans, not an array; see README for full options.

app.use(actuator({ health: true, info: true }))

Sets up an Express app with the actuator middleware, enabling health and info endpoints for Cloud Foundry.

const express = require('express'); const app = express(); const actuator = require('express-cloudfoundry-actuator-middleware'); // Optional: configure endpoints const options = { health: true, info: true }; app.use(actuator(options)); app.get('/', (req, res) => res.send('Hello World!')); const PORT = process.env.PORT || 3000; app.listen(PORT, () => console.log(`App listening on port ${PORT}`));
Debug
Known footguns
gotchaThe actuator middleware must be used before other routes to ensure endpoints are accessible.
gotchaOptions object is required; passing no arguments or undefined will still enable default endpoints, but any additional configuration must be passed explicitly.
gotchaThe 'info' endpoint requires a build info file generated by Cloud Foundry Actuator CLI; without it, the endpoint may return empty or error.
deprecatedNode engine requirement is >=6, which is end-of-life. The package may not work on modern Node versions (>=18) without compat flags.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
11 hits · last 30 days
ahrefsbot
4
claudebot
4
gptbot
3
Resources