ucdd2-sp15 / announcements

Issues as the course mailing list for announcements
1 stars 1 forks source link

Getting the ""Application Error: An error occurred in the application and your page could not be served." Error in Heroku? #13

Open develra opened 9 years ago

develra commented 9 years ago

Heroku is rejecting you binding the port to 3000. Change your mongo.js server code to be

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

    var host = server.address().address
    var port = server.address().port

    console.log('App listening at http://%s:%s', host, port)
});

the process.env.PORT lets heroku pick its own port.