Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
cf-nodejs-client
Advanced tools
This project provides a simple client library to interact with the Cloud Foundry Architecture:
Using this library, you could interact the following components on PWS , Bluemix or a Local Cloud Foundry instance:
Cloud Controller | UAA | Logging & Metrics |
---|---|---|
Apps | Users | Logs |
Buildpacks | ||
Domains | ||
Jobs | ||
Organizations | ||
Organizations Quotas | ||
Routes | ||
Service Bindings | ||
Spaces | ||
Spaces Quotas | ||
Stacks | ||
User provided Services | ||
Users |
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:
PaaS Management:
If you need to interact with a Cloud Foundry platform try this online tool and use this example:
var endpoint = "https://api.run.pivotal.io";
var username = "PWS_USERNAME";
var password = "PWS_PASSWORD";
var authorization_endpoint = "";
var CloudFoundry = require("cf-nodejs-client").CloudFoundry;
var CloudFoundryUsersUAA = require("cf-nodejs-client").UsersUAA;
CloudFoundry = new CloudFoundry();
CloudFoundryUsersUAA = new CloudFoundryUsersUAA();
CloudFoundry.setEndPoint(endpoint);
CloudFoundry.getInfo().then(function (result) {
console.log(result);
authorization_endpoint = result.authorization_endpoint;
token_endpoint = result.token_endpoint;
CloudFoundryUsersUAA.setEndPoint(authorization_endpoint);
return CloudFoundryUsersUAA.login(username, password);
}).then(function (result) {
console.log(result);
}).catch(function (reason) {
console.error("Error: " + reason);
});
Explore the library and if you like the features, use it on your App:
npm install cf-nodejs-client --save
Online documentation:
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 Instance | PWS | Bluemix |
---|---|---|
2.25.0 | 2.43.0 | 2.27.0 |
Last test: 2015/11/20
Test suite:
npm test
Code coverage:
istanbul cover node_modules/mocha/bin/_mocha -- -R spec
Continous integration:
https://travis-ci.org/jabrena/cf-nodejs-client/
Take a look this doc to check the evolution of this Client for Cloud foundry.
If you have any question or doubt, please create an issue.
Juan Antonio
Version 0.11.0 2015-11-20
Apps.prototype.create = function (token_type, access_token, appOptions) {
Apps.prototype.add = function (token_type, access_token, appOptions) {
Apps.prototype.stopApp = function (token_type, access_token, app_guid) {
Apps.prototype.stop = function (token_type, access_token, app_guid) {
Apps.prototype.startApp = function (token_type, access_token, app_guid) {
Apps.prototype.start = function (token_type, access_token, app_guid) {
Apps.prototype.deleteApp = function (token_type, access_token, app_guid) {
Apps.prototype.remove = function (token_type, access_token, app_guid) {
Apps.prototype.uploadApp = function (token_type, access_token, app_guid, filePath, async) {
Apps.prototype.upload = function (token_type, access_token, app_guid, filePath, async) {
Apps.prototype.environmentVariables = function (token_type, access_token, app_guid) {
Apps.prototype.getEnvironmentVariables = function (token_type, access_token, app_guid) {
Organizations.prototype.memoryUsage = function (token_type, access_token, org_guid) {
Organizations.prototype.getMemoryUsage = function (token_type, access_token, org_guid) {
Organizations.prototype.summary = function (token_type, access_token, org_guid) {
Organizations.prototype.getSummary = function (token_type, access_token, org_guid) {
OrganizationsQuota.prototype.quotaDefinitions = function (token_type, access_token) {
OrganizationsQuota.prototype.getQuotaDefinitions = function (token_type, access_token) {
OrganizationsQuota.prototype.quotaDefinition = function (token_type, access_token, org_guid) {
OrganizationsQuota.prototype.getQuotaDefinition = function (token_type, access_token, org_guid) {
Routes.prototype.addRoute = function (token_type, access_token, routeOptions) {
Routes.prototype.add = function (token_type, access_token, routeOptions) {
Routes.prototype.deleteRoute = function (token_type, access_token, route_guid) {
Routes.prototype.remove = function (token_type, access_token, route_guid) {
ServiceBindings.prototype.removeServiceBinding = function (token_type, access_token, service_guid){
ServiceBindings.prototype.remove = function (token_type, access_token, service_guid) {
Spaces.prototype.summary = function (token_type, access_token, space_guid) {
Spaces.prototype.getSummary = function (token_type, access_token, space_guid) {
Spaces.prototype.userRoles = function (token_type, access_token, space_guid) {
Spaces.prototype.getUserRoles = function (token_type, access_token, space_guid) {
SpacesQuota.prototype.quotaDefinitions = function (token_type, access_token) {
SpacesQuota.prototype.getQuotaDefinitions = function (token_type, access_token) {
UserProvidedServices.prototype.create = function (token_type, access_token, user_provided_service_options) {
UserProvidedServices.prototype.add = function (token_type, access_token, user_provided_service_options) {
UserProvidedServices.prototype.delete = function (token_type, access_token, service_guid) {
UserProvidedServices.prototype.remove = function (token_type, access_token, service_guid) {
Users.prototype.getUsers = function (token_type, access_token, user_guid) {
Users.prototype.getUsers = function (token_type, access_token) {
Environment: LOCAL_INSTANCE_1
72 passing (2m) 26 pending
Environment: PIVOTAL
64 passing (5m) 21 pending
Environment: BLUEMIX
64 passing (5m) 21 pending
FAQs
A Cloud Foundry Client for Node.js
The npm package cf-nodejs-client receives a total of 42 weekly downloads. As such, cf-nodejs-client popularity was classified as not popular.
We found that cf-nodejs-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.