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:
Then I moved all the existing code under a server folder and created a client folder for the client project:
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:
And I created a second stage to deploy the client:
Quite simple indeed!