Example of using phantomjs webserver module
phantomjs server.js
This can be deployed to heroku with the phantomjs buildpack.
# create a new heroku app
heroku create --stack cedar --buildpack http://github.com/stomita/heroku-buildpack-phantomjs.git
# deploy
git push heroku master