mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 09:42:21 -04:00
global: Add the root_path variable in global.
This will can be help for work the better way in use the path into the core and modules.
This commit is contained in:
parent
4237d0c7e3
commit
f58e758a41
2 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue