From 7a455dc772d35eb4c929c96ba9b20f52402a54e2 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Mon, 24 Nov 2014 16:06:45 +0000 Subject: [PATCH] Forgot to actually commit the spun-out file in 3a1649c - adding it now. --- server/helpers/configloader.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 server/helpers/configloader.js diff --git a/server/helpers/configloader.js b/server/helpers/configloader.js new file mode 100644 index 0000000..7ae9daf --- /dev/null +++ b/server/helpers/configloader.js @@ -0,0 +1,11 @@ +module.exports = function () { + var config = require('../configuration.js'); + var conf_switch = process.argv.indexOf('-c'); + if (conf_switch !== -1) { + if (process.argv[conf_switch + 1]) { + return config.loadConfig(process.argv[conf_switch + 1]); + } + } + + return config.loadConfig(); +} -- 2.25.1