cfenv 1.0.0 with new getServiceCreds() method

I’ve updated the node.js cfenv package at npm:

  • moved from the netherworld of 0.x.y versioned packages to version 1.0.0
  • updated some of the package dependencies
  • added a new appEnv.getServiceCreds(spec) method

In case you’re not familiar with the cfenv package, it’s intended to be the Swiss army knife of handling your Cloud Foundry runtime environment variables,

Here’s a quick example that doesn’t including accessing services in

You can start your server with this kind of snippet, which provides the
correct port, binding address, and url of the running server; and it will
run locally as well as on CloudFoundry.

For more information, see the cfenv readme.

new API appEnv.getServiceCreds(spec)

Lately I’ve been finding myself just needing the credentials property value from
service objects. To make this just a little bit easier than:

you can now do this, using the new

No need to get the whole service if you don’t need it, and you don’t have to
type out credentials all the time 🙂

what else?

What other gadgets does cfenv need? If you have thoughts, don’t hesitate
to open an issue, send a pull request, etc.

Share this post:

Add Comment
No Comments

Leave a Reply

Your email address will not be published.Required fields are marked *

More Community Stories

InterConnect 2015 Revisited: Internet of Things and Watson

One of the main announcements at InterConnect was the formation of the new Internet of Things division. That announcement got me thinking about how Watson can be leveraged in the Internet of Things world. Specifically, how can the Question & Answer services and products  be used by IBM customers and partners that have solutions in that space.

Continue reading

Elevate Watson Image Recognition with Bluemix services

To see what Watson Image Recognition with Bluemix infrastructure and services can do together, you need a problem that seems insurmountable. Consider this dilemma: So far, 20 of your homeowners insurance policy-holders have filed claims for roof damage sustained in a recent hailstorm. More claims are expected. Working the usual way, site inspections and documentation […]

Continue reading

Best of Bluemix: WebSockets and Docker as CLI app, REST services, Twitter Analytics

This post regularly showcases some of the best new Bluemix tutorials, videos, and other content published each week on developerWorks. Today's features using Docker and WebSockets to turn a CLI app into a cloud-enabled service, an example of a compelling, state-of-the-art web app and REST service, and two courses describing the Simple Search app and Spark Streaming with Twitter and Watson on Bluemix.

Continue reading