Did you look into using Zombie instead of PhantomJS? It advertises itself as a tool for headless full stack testing utility but I have come to rely on it for integrating headless browsing in node.js apps.
I have tried zombie but there were various issues with getting it to work. Phantomjs was just much more painless.