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

cf-client

Package Overview
Dependencies
Maintainers
4
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-client

A Cloud Foundry Client for Node.js

  • 0.13.16
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
decreased by-4%
Maintainers
4
Weekly downloads
 
Created
Source

cf-nodejs-client

Build Status Dependency Status devDependency Status Changelog

NPM

Note: This package is not ready for a production App yet.

This project provides a simple client library to interact with the Cloud Foundry Architecture:

ScreenShot

Using this library, you could interact with the following platforms: PWS , Bluemix or a Local Cloud Foundry instance:

Cloud ControllerUAALogging & Metrics
AppsUsersLogs
Buildpacks
Domains
Jobs
Organizations
Organizations Quotas
Routes
Services
Service Bindings
Service Instances
Service Plans
Spaces
Spaces Quotas
Stacks
User provided Services
Users

Applications

Node.js with Express are a great combination to develop Web applications. If you observe the Sinatra market, you will notice that Node.js has a huge Traction.

The development doesn't cover the whole CC API. Main areas of development are:

App life cycle:

  • Create an App
  • Upload source code in .zip or .war (Support for Static, Python, PHP, Node.js & JEE)
  • Create an User Provided Services
  • Associate Apps with an User Provided Services
  • Start | Stop an App
  • Restage Apps
  • Scale Apps
  • Simple Logs management
  • Remove Apps
  • Remove User Provided Services

PaaS Management:

  • Organization quota
  • Organization
  • Space
  • Services, Service Instances, Service Plans, User provided Services & Service Binding
  • UAA Users
  • Users

Getting Started

If you need to interact with a Cloud Foundry platform try this online tool and use this example:

"use-strict";

const endpoint = "https://api.run.pivotal.io";
const username = "PWS_USERNAME";
const password = "PWS_PASSWORD";

const CloudController = new (require("cf-nodejs-client")).CloudController(endpoint);
const UsersUAA = new (require("cf-nodejs-client")).UsersUAA;
const Apps = new (require("cf-nodejs-client")).Apps(endpoint);

CloudController.getInfo().then( (result) => {
    UsersUAA.setEndPoint(result.authorization_endpoint);
    return UsersUAA.login(username, password);
}).then( (result) => {
	Apps.setToken(result);
    return Apps.getApps();
}).then( (result) => {
    console.log(result);
}).catch( (reason) => {
    console.error("Error: " + reason);
});

Explore the library and if you like the features, use it on your App:


npm install cf-client --save

Technical Documentation

JSDoc

Testing

This project has a test suite to ensure the reability of this project. Take a look the Tests cases developed with Mocha & Chai to understand some stuff about Cloud Foundry and the usage of this client. Besides, the project has invested some amount of time in testing phase to be the code with a nice coverage level.

The development has been tested with:

Local InstancePWSBluemix
2.25.02.47.02.40.0

Last test: 2016/01/26

Test suite:

npm test

Code coverage:

istanbul cover node_modules/mocha/bin/_mocha -- -R spec

Continous integration:

https://travis-ci.org/IBM-Bluemix/cf-nodejs-client/

Versions

Take a look this doc to check the evolution of this Client for Cloud foundry.

References

Issues

If you have any question or doubt, please create an issue.

License

Licensed under the Apache License, Version 2.0.

Keywords

FAQs

Package last updated on 31 May 2016

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