mirror of
https://github.com/jimeh/heartb.it.git
synced 2026-02-19 04:46:40 +00:00
don't try to listen to a port twice :P
This commit is contained in:
2
app.js
2
app.js
@@ -29,7 +29,7 @@
|
||||
return res.render('index');
|
||||
});
|
||||
|
||||
app.listen(3000);
|
||||
app.listen(process.env.PORT || 3000);
|
||||
|
||||
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Module Dependencies
|
||||
|
||||
express = require 'express'
|
||||
app = module.exports = express.createServer()
|
||||
|
||||
@@ -26,7 +25,6 @@ app.get '/', (req, res) ->
|
||||
|
||||
|
||||
# Set port and start server.
|
||||
app.listen 3000
|
||||
app.listen process.env.PORT || 3000
|
||||
|
||||
console.log "Express server listening on port %d in %s mode",
|
||||
|
||||
Reference in New Issue
Block a user