Node.js port issue on Heroku cedar stack Node.js port issue on Heroku cedar stack express express

Node.js port issue on Heroku cedar stack


Can you show the entire section of code where you call listen? You should be checking for the process environment variable PORT, not just hardcoding it to 3000. From their docs:

var port = process.env.PORT || 3000;app.listen(port, function() {