diff --git a/server.js b/server.js index 10f7cff57a..947264c73b 100755 --- a/server.js +++ b/server.js @@ -50,7 +50,7 @@ require('./config/express')(app, passport); require('./config/routes')(app, passport, auth); //Start the app by listening on -var port = config.port; +var port = process.env.PORT || config.port; app.listen(port); console.log('Express app started on port ' + port); @@ -58,4 +58,4 @@ console.log('Express app started on port ' + port); logger.init(app, passport, mongoose); //expose app -exports = module.exports = app; \ No newline at end of file +exports = module.exports = app;