Skip to content

Commit

Permalink
Modified app.js so that the server will listen on port 80 now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tea-mates committed Aug 27, 2011
1 parent 8ca2236 commit daf439e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app.js
Expand Up @@ -103,5 +103,13 @@ logger.debug("cmd:" + cmd)
});
});

app.listen(3000);
app.listen(process.env.NODE_ENV === 'production' ? 80 : 8000, function() {

// if run as root, downgrade to the owner of this file
// if (process.getuid() === 0)
// require('fs').stat(__filename, function(err, stats) {
// if (err) return console.log(err)
// process.setuid(stats.uid);
// });
});
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);

0 comments on commit daf439e

Please sign in to comment.