summaryrefslogtreecommitdiff
path: root/jekyll-hook.js
diff options
context:
space:
mode:
authorBenjamin J. Balter <ben.balter@github.com>2013-05-15 15:07:21 -0400
committerBenjamin J. Balter <ben.balter@github.com>2013-05-15 15:07:21 -0400
commit426746846739d0937a0c8f8db14a771c507f336b (patch)
tree63e28f40954c93cb777031d3b1355b11d8f03256 /jekyll-hook.js
parentd9a643ffa2ea161205b11883472135de460eceac (diff)
look for port in process.env, otherwise default to 8080
Diffstat (limited to 'jekyll-hook.js')
-rwxr-xr-xjekyll-hook.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jekyll-hook.js b/jekyll-hook.js
index 78533cf..b78fc59 100755
--- a/jekyll-hook.js
+++ b/jekyll-hook.js
@@ -82,8 +82,9 @@ app.post('/hooks/jekyll/:branch', function(req, res) {
});
// Start server
-app.listen(8080);
-console.log('Listening on port 8080');
+var port = process.env.PORT || 8080;
+app.listen(port);
+console.log('Listening on port ' + port);
function run(file, params, cb) {
var process = spawn(file, params);