VCAP_SERVICES
Parse and return service credentials from VCAP_SERVICES
environment variable that Bluemix provides.
Installation
$ npm install vcap_services --save
Usage
var vcapServices = ;var credentials = vcapServices;console;
If VCAP_SERVICES
is:
Output:
Getting credentials for a specific plan
Get credentials that match a specific service plan (only for VCAP_SERVICES
).
var vcapServices = ;var credentials = vcapServices;console;
Getting credentials for a specific instance
Get credentials that match a specific service instance (replace "YOUR NLC NAME" with the name of your service instance).
var vcapServices = ;var credentials = vcapServices
Getting credentials for a specific plan and instance
Get credentials that match a specific service plan and instance (replace "YOUR NLC NAME" with the name of your service instance).
var vcapServices = ;var credentials = vcapServices;console;
Getting credentials for a specific tag
Get credentials that match a specific service tag, regardless of the service type.
var vcapServices = ;var credentials = vcapServices;console;
Tests
Running all the tests:
$ npm test
Running a specific test:
$ mocha -g '<test name>'
License
MIT.
Contributing
See CONTRIBUTING.