New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-cloudfoundry-actuator

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-cloudfoundry-actuator

Actuator support for NodeJS Cloud Foundry Applications

latest
Source
npmnpm
Version
3.5.0
Version published
Weekly downloads
14
-44%
Maintainers
1
Weekly downloads
 
Created
Source

node-cloudfoundry-actuator

Build Status Dependency Status DevDependency Status Npm downloads Npm Version Git tag Github issues License

Actuator support for NodeJS Cloud Foundry Applications.

Currently provides health and info endpoints for Cloud Foundry Apps Manager. These two and future Endpoints are restricted to users that

  • are currently logged into the Apps Manager and
  • have sufficient privileges to view sensitive information.

Use Cloud Foundry Actuator CLI to generate a build info file ahead of deployment time. This file is optional, but we can't show version infos without it.

Health status will be shown automatically and will be costumizable in the future.

See Express Cloud Foundry Actuator Middleware Example for an example application with full integration of Cloud Foundry Actuator CLI and Express Cloud Foundry Actuator Middleware.

Installation

npm install node-cloudfoundry-actuator --save

Example

The Cloud Foundry Apps Manager needs to be able to call various actuator endpoints to fetch health state and build informations. Applications integrating this library need to expose these endpoints.

A typical Connect middleware implementation might look like this:

'use strict'

const Actuator = require('node-cloudfoundry-actuator')
const actuator = new Actuator()

module.exports = () => {
    return (req, res, next) => {
        try {
            actuator.handle(req, res, next)
        } catch (e) {
            next()
        }
    }
}

The main class of this library has one public method handle which accepts a HttpRequest and HttpResponse. Instances of this class will handle positive responses and expect the implementing library to handle errors.

Only requests to a path matching /cloudfoundryapplication[/*] will be intercepted and answered.

Screenshots

App overview

Cloud Foundry App overview with Health Check

Settings with app short info

Cloud Foundry App settings with short app info

Settings with app info popup

Cloud Foundry App settings with app info popup

License

This project is distributed under the MIT license.

Keywords

Cloud Foundry

FAQs

Package last updated on 13 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts