From bbdc43c750de3d6099b11198fb60fa266649cded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sat, 28 Jan 2017 21:37:12 -0300 Subject: [PATCH] Use configuration file in index.html when is set MM_CONFIG_FILE --- index.html | 2 +- js/server.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 86a69a4a..606f5aac 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@
- + diff --git a/js/server.js b/js/server.js index f1de2420..5c775f69 100644 --- a/js/server.js +++ b/js/server.js @@ -46,6 +46,12 @@ var Server = function(config, callback) { var html = fs.readFileSync(path.resolve(global.root_path + "/index.html"), {encoding: "utf8"}); html = html.replace("#VERSION#", global.version); + configFile = "config/config.js"; + if (typeof(global.configuration_file) !== "undefined") { + configFile = global.configuration_file; + } + html = html.replace("#CONFIG_FILE#", configFile); + res.send(html); });