perhaps it isnt able to listen to the server properly as proposed by a stackoverflow answer
have to add an if statement to tell if the app is on heroku or not because of the different config variables