Read the statement by Michael Teeuw here.
Start magic mirror server with arguments
-
Hi, setting my first magic mirror!
It has two monitors and I’m using my own server for hosting the magic mirror server.My idea is having two instances with different configs, one per screen.
I fail to see any way to specify a config file, something likenode serveronly config/config2screen.js
I’m taking a look at the code and doesn’t seem too hard to add that possibility. I want to make sure it is not already done, the test suite seems to be doing something similar (though I’m not seeing where exactly yet)
I’d rather go with that option because it would be much cleaner for my server to deal with several instances I could create and without duplicating files.
-
you can run
MM_CONFIG_FILE=config/config.js npm run server
and
MM_CONFIG_FILE=config/config2.js npm run server
Same works for
npm run start
.You have to use different ports in your configs.
-
@dorianhawkmoon you have to make two different MagicMirror folders to get two different config.js files
if u want to display on the server screens then
in one (the right) you need to addelectronOption:{ x:1920},
where 1920 is the width of the 1st screen
(mine is 3820 on my tv with pi4, and 2560 on my desktop, and 1920 on my pi4 in 1920 mode)
-
you can run
MM_CONFIG_FILE=config/config.js npm run server
and
MM_CONFIG_FILE=config/config2.js npm run server
Same works for
npm run start
.You have to use different ports in your configs.
-
@karsten13 thanks… I didn’t know that
-
@karsten13 Thanks! exactly what I was looking for. No issues with the ports, I took that into account as well