Skip to content

Commit

Permalink
Make port dynamic for Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
tombye committed Feb 17, 2014
1 parent 6bd2dfc commit 21d84c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
var express = require('express'),
cons = require('consolidate'),
app = express(),
mustacheRender = require("./lib/mustacheRender").mustacheRender;
mustacheRender = require("./lib/mustacheRender").mustacheRender,
port = (process.env.PORT || 3000);

// Application settings
app.engine('html', cons.mustache);
Expand Down Expand Up @@ -43,7 +44,7 @@ app.get('/sample', function (req, res) {

// start the app

app.listen(3000);
app.listen(port);
console.log('');
console.log('Listening on port 3000');
console.log('Listening on port ' + port);
console.log('');

0 comments on commit 21d84c6

Please sign in to comment.