I am getting an error in my heroku logs that I cannot figure out how to fix.
I read through a thread on stack overflow Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch). This seemed very similar to my problem.
I have developing my app with the express generator. So my bin folder holds the port information
var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
I know the process.env.PORT is necessary to open my heroku site. I initially assumed this would work well enough as my app.js only had a reference to express.
I could not get the page to open so I added the port information to my app.js file in addition to the bin folder.
app.set('port', (process.env.PORT || 3000));
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
I got this github page https://github.com/heroku/node-js-getting-started/blob/master/index.js#L16.
However, I am still getting the same error. I do not know where else to look. The only additional note I see with an error is
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
These seem to be targeting the same problem.