MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Start magic mirror server with arguments

    Scheduled Pinned Locked Moved Solved Troubleshooting
    5 Posts 3 Posters 736 Views 3 Watching
    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 Offline
      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 karsten13K 2 Replies Last reply Reply Quote 0
      • karsten13K Offline
        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 Offline
          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

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • karsten13K Offline
            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 Offline
              sdetweil @karsten13
              last edited by

              @karsten13 thanks… I didn’t know that

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • D Offline
                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 Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy