I have my first node.js app (runs fine locally) - but I am unable to deploy it via heroku (first time w/ heroku as well). The code is below. SO doesn\'t let me write so much
In my case, I was using example from https://hapijs.com/
To fix the problem I replaced
server.connection({ host: 'localhost', port: 8000 });
with
server.connection({ port: process.env.PORT || 3000 });