From 10623873e8b0b8b44f278b2bdf4897cf5ba858db Mon Sep 17 00:00:00 2001 From: John Crepezzi Date: Thu, 27 Sep 2012 12:01:00 -0400 Subject: [PATCH] Allow host setting by ENV --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 232757a..aaf1583 100644 --- a/server.js +++ b/server.js @@ -9,8 +9,8 @@ var DocumentHandler = require('./lib/document_handler'); // Load the configuration and set some defaults var config = JSON.parse(fs.readFileSync('./config.js', 'utf8')); -config.port = config.port || 7777; -config.host = config.host || 'localhost'; +config.port = process.env.PORT || config.port || 7777; +config.host = process.env.HOST || config.host || 'localhost'; // Set up the logger if (config.logging) {