Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix variable problems #3304

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ _This release is scheduled to be released on 2024-01-01._
- Fix style issues after prettier update
- Fix calendar test (#3291) by moving "Exdate check" from e2e to electron to run on a Thursday
- Fix calendar config params `fetchInterval` and `excludedEvents` were never used from single calendar config (#3297)
- Fix MM_PORT variable not used in electron and allow full path for MM_CONFIG_FILE variable (#3302)

## [2.25.0] - 2023-10-01

Expand Down
2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Log.log(`Starting MagicMirror: v${global.version}`);
global.root_path = path.resolve(`${__dirname}/../`);

if (process.env.MM_CONFIG_FILE) {
global.configuration_file = process.env.MM_CONFIG_FILE;
global.configuration_file = process.env.MM_CONFIG_FILE.replace(`${global.root_path}/`, "");
}

// FIXME: Hotfix Pull Request
Expand Down
3 changes: 2 additions & 1 deletion js/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function createWindow () {
}

let address = (config.address === void 0) | (config.address === "") | (config.address === "0.0.0.0") ? (config.address = "localhost") : config.address;
mainWindow.loadURL(`${prefix}${address}:${config.port}`);
const port = process.env.MM_PORT || config.port;
mainWindow.loadURL(`${prefix}${address}:${port}`);

// Open the DevTools if run with "npm start dev"
if (process.argv.includes("dev")) {
Expand Down