diff --git a/node/utils/Settings.js b/node/utils/Settings.js index 7ef809c9..fa9deaf2 100644 --- a/node/utils/Settings.js +++ b/node/utils/Settings.js @@ -20,6 +20,7 @@ */ var fs = require("fs"); +var path = require('path'); /** * The IP ep-lite should listen to @@ -74,7 +75,8 @@ exports.loglevel = "INFO"; exports.httpAuth = null; //read the settings sync -var settingsStr = fs.readFileSync("../settings.json").toString(); +var settingsPath = path.normalize(__dirname + "/../../"); +var settingsStr = fs.readFileSync(settingsPath + "settings.json").toString(); //remove all comments settingsStr = settingsStr.replace(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/gm,"").replace(/#.*/g,"").replace(/\/\/.*/g,"");