Skip to content

Commit

Permalink
Fixing the port for heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirsten Jones committed Jan 6, 2012
1 parent b9210f7 commit 0d86ece
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.js
Expand Up @@ -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);
}

0 comments on commit 0d86ece

Please sign in to comment.