From 0d86ece03685fb91055035572dba2e1806146b8d Mon Sep 17 00:00:00 2001 From: Kirsten Jones Date: Fri, 6 Jan 2012 12:40:08 -0800 Subject: [PATCH] Fixing the port for heroku --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index ca0c6b33..b4e59964 100755 --- a/app.js +++ b/app.js @@ -665,6 +665,7 @@ app.get('/:api([^\.]+)', function(req, res) { // Only listen on $ node app.js if (!module.parent) { - app.listen(config.port, config.address); + var port = process.env.PORT || config.port; + app.listen(port, config.address); console.log("Express server listening on port %d", app.address().port); }