Product
Introducing Java Support in Socket
We're excited to announce that Socket now supports the Java programming language.
vcap_services
Advanced tools
Parse and return service credentials from VCAP_SERVICES
environment variable that Bluemix provides.
$ npm install vcap_services --save
var vcapServices = require('vcap_services');
var credentials = vcapServices.getCredentials('personality_insights');
console.log(credentials);
If VCAP_SERVICES
is:
{
"personality_insights": [{
"credentials": {
"password": "<password>",
"url": "<url>",
"username": "<username>"
},
"label": "personality_insights",
"name": "personality-insights-service",
"plan": "standard"
}]
}
Output:
{
"password": "<password>",
"url": "<url>",
"username": "<username>"
}
Get credentials that match a specific service plan (only for VCAP_SERVICES
).
var vcapServices = require('vcap_services');
var credentials = vcapServices.getCredentials('personality_insights', 'standard');
console.log(credentials);
Get credentials that match a specific service instance (replace "YOUR NLC NAME" with the name of your service instance).
var vcapServices = require('vcap_services');
var credentials = vcapServices.getCredentials('natural_language_classifier', null, 'YOUR NLC NAME');
console.log(credentials);
Get credentials that match a specific service plan and instance (replace "YOUR NLC NAME" with the name of your service instance).
var vcapServices = require('vcap_services');
var credentials = vcapServices.getCredentials('natural_language_classifier', 'standard', 'YOUR NLC NAME');
console.log(credentials);
Running all the tests:
$ npm test
Running a specific test:
$ mocha -g '<test name>'
MIT.
See CONTRIBUTING.
FAQs
Parse and return service credentials from VCAP_SERVICES.
The npm package vcap_services receives a total of 2,561 weekly downloads. As such, vcap_services popularity was classified as popular.
We found that vcap_services 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.
Product
We're excited to announce that Socket now supports the Java programming language.
Security News
Socket detected a malicious Python package impersonating a popular browser cookie library to steal passwords, screenshots, webcam images, and Discord tokens.
Security News
Deno 2.0 is now available with enhanced package management, full Node.js and npm compatibility, improved performance, and support for major JavaScript frameworks.