It's very often the case that when a Bluemix app doesn't work the way you expect it to, you don't have any idea WHY it doesn't work the way you expect it to. How can you diagnose this? With logging and lots of it. This article will explain how to access your logs in Bluemix, suggest general logging techniques, and then go in-depth on logging frameworks/libraries specific to Node.js.
If you're building a web app, you probably have secrets you have to deal with like database credentials, session keys, etc. So, where do you keep these secrets? Developers using Cloud Foundry based systems has a truly secure option: Cloud Foundry's user-provided services. This blog post will go over the advantages and disadvantages of the traditional and modern approaches.
In a recent blog post Dr Nic Williams - aka "Dr Nic" - introduced a new buildpack that can be used to create a server which contains no logic, just serves up resources like HTML / JS / CSS / image / etc resources – aka a “static website”. Dr Nic shows how to deploy it to Pivotal Web Services, and while this should work on Bluemix, you never know until you try. So I tried. And of course it worked. To test the buildpack, I happened to have a perfect example that I have been playing with ....
I've just put together a little Bluemix application for node.js - bluemix-service-switcher - which shows how to access service information using the cfenv package. This sample, and the cfenv package, should also work fine on any Cloud Foundry-based PaaS. cfenv provides a number of functions to deal with the VCAP_SERVICES and VCAP_APPLICATION environment variables. You will never have to JSON.parse() them again!
Twilio provides an awesome SMS and telephony service that you can use in web applications. . I’d been wanting to build an application with Twilio for a while now, and finally did it the other day. It’s called zip-weather. The app will respond to text messages and voice calls, prompt you for a location, then provide a weather forecast for that location.
While npmjs.org is a great place to host node packages, ANYONE can access them. What happens if you have multiple application which all use a package you wrote, but you’d like to not have to publish that package publicly? Private packages like this aren’t really a first-class notion in the node world – yet. But there are various strategies you can use to provide this capability until they are.