Node.js client-server deployment pipelines on Bluemix

On the road learning node.js I stumbled upon the awkwardness of having two engines serving http requests on different paths, say, for example, having calls to /html served by Express and to /api served by hapi.js

Since I’m just testing these frameworks out, I didn’t want to completely separate the source tree into independent repositories, especially because I’d need them to update in lockstep for as long as the client/server API is not stable.

Turns out the Bluemix deployment pipelines offered by hub.jazz.net are quite flexible, allowing for custom commands to be configured, so I set out to create a split pipeline configuration out of a twin project folder setup.

I started with creating an additional node for the client code:

The Server and Client nodes

Then I moved all the existing code under a server folder and created a client folder for the client project:

The two separate node.js apps

The deployment pipeline allows up to two stages for free, exactly what I needed. I reconfigured the first stage to deploy from the freshly created server folder: