October 3, 2014 | Written by: Patrick Mueller
Categorized: Community | How-tos
Share this post:
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
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.
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
credentials all the time 🙂
What other gadgets does
cfenv need? If you have thoughts, don’t hesitate
to open an issue, send a pull request, etc.