changing server.js to use process.env.PORT for heroku
more changes to server.js to work on heroku