Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cf-nodejs-client

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-nodejs-client

A Cloud Foundry Client for Node.js

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-78.26%
Maintainers
1
Weekly downloads
 
Created
Source

cf-nodejs-client [Alpha]

A Cloud Foundry Client for Node.js

Build Status

Note: Not use this library in a production App.

This project try to provide a library to interact with Cloud Foundry REST API. http://apidocs.cloudfoundry.org/213/

Currently, Pivotal offer the following clients:

https://github.com/cloudfoundry/cli

https://github.com/cloudfoundry/cf-java-client

The library uses Promises.

https://promisesaplus.com/

https://strongloop.com/strongblog/promises-in-node-js-with-q-an-alternative-to-callbacks/

Usage


/*jslint node: true*/
/*global describe: true, it: true*/

"use strict";

var config = require('./config.json');
var cloudFoundry = require("cf-nodejs-client").CloudFoundry;
cloudFoundry = new cloudFoundry(config.CF_API_URL);

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

var token_endpoint = null;

cloudFoundry.getInfo().then(function (result) {
	token_endpoint = result.token_endpoint;	
    return cloudFoundry.login(token_endpoint,config.username,config.password);
}).then(function (result) {
    console.log(result);   
}).catch(function (reason) {
    console.error("Error: " + reason);
});

Keywords

FAQs

Package last updated on 14 Aug 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc