diff --git a/CHANGELOG.md b/CHANGELOG.md index d2c6244a..ee5b97f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added abilty set the classes option to compliments module for style and text size of compliments. - Added ability to configure electronOptions - Calendar module: option to hide private events +- Add root_path for global vars ### Updated - Modified translations for Frysk. diff --git a/js/app.js b/js/app.js index 29036f69..45b22f59 100644 --- a/js/app.js +++ b/js/app.js @@ -14,6 +14,9 @@ var path = require("path"); global.version = JSON.parse(fs.readFileSync("package.json", "utf8")).version; console.log("Starting MagicMirror: v" + global.version); +// global absolute root path +global.root_path = path.resolve(__dirname + "/../"); + // The next part is here to prevent a major exception when there // is no internet connection. This could probable be solved better. process.on("uncaughtException", function (err) {