mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-15 08:27:37 +00:00
refactor: use global.root_path instead relative paths (#3883)
This commit is contained in:
@@ -13,10 +13,9 @@ app.use(basicAuth);
|
||||
|
||||
// Set available directories
|
||||
const directories = ["/tests/configs", "/tests/mocks"];
|
||||
const rootPath = path.resolve(`${__dirname}/../../../`);
|
||||
|
||||
for (let directory of directories) {
|
||||
app.use(directory, express.static(path.resolve(rootPath + directory)));
|
||||
app.use(directory, express.static(path.resolve(`${global.root_path}/${directory}`)));
|
||||
}
|
||||
|
||||
let server;
|
||||
|
Reference in New Issue
Block a user