Node refactor to run this thing as an app on heroku