Skip to content

Commit

Permalink
hotfix PL MagicMirrorOrg#673
Browse files Browse the repository at this point in the history
  • Loading branch information
roramirez committed Feb 1, 2017
1 parent b02920c commit 2ea14e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ if (process.env.MM_CONFIG_FILE) {
global.configuration_file = process.env.MM_CONFIG_FILE;
}

//Hotfix PullRequest #673
if (process.env.MM_PORT) {
global.mm_port = process.env.MM_PORT;
}

// 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) {
Expand Down
6 changes: 5 additions & 1 deletion js/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
* MIT Licensed.
*/

var port = 8080;
if (typeof(mm_port) !== "undefined") {
port = mm_port;
}
var defaults = {
port: process.env.MM_PORT || 8080,
port: port,
kioskmode: false,
electronOptions: {},
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
Expand Down

0 comments on commit 2ea14e2

Please sign in to comment.