From 0a6a0ee4dd443250521d7898ab3086e7fc4f3afc Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sat, 7 Dec 2013 10:47:40 -0800 Subject: [PATCH] feat(config): set default host/port from env vars This make it simpler to use Karma on Cloud9. --- lib/constants.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/constants.js b/lib/constants.js index 49e380301..16ded781e 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -4,8 +4,8 @@ var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString()) exports.VERSION = pkg.version; -exports.DEFAULT_PORT = 9876; -exports.DEFAULT_HOSTNAME = 'localhost'; +exports.DEFAULT_PORT = process.env.PORT || 9876; +exports.DEFAULT_HOSTNAME = process.env.IP || 'localhost'; // log levels exports.LOG_DISABLE = 'OFF';