MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED Start magic mirror server with arguments

    Troubleshooting
    3
    5
    179
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DorianHawkmoon last edited by

      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 like

      node 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.

      S karsten13 2 Replies Last reply Reply Quote 0
      • karsten13
        karsten13 @DorianHawkmoon last edited by karsten13

        @dorianhawkmoon

        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.

        S D 2 Replies Last reply Reply Quote 1
        • S
          sdetweil @DorianHawkmoon last edited by sdetweil

          @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 add

             electronOption:{ 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)

          Sam

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • karsten13
            karsten13 @DorianHawkmoon last edited by karsten13

            @dorianhawkmoon

            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.

            S D 2 Replies Last reply Reply Quote 1
            • S
              sdetweil @karsten13 last edited by

              @karsten13 thanks… I didn’t know that

              Sam

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • D
                DorianHawkmoon @karsten13 last edited by

                @karsten13 Thanks! exactly what I was looking for. No issues with the ports, I took that into account as well

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy