• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

After need take another config.js

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 2 Posters 3.3k Views 2 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.
  • S Away
    sdetweil @pi-user
    last edited by Mar 28, 2020, 7:58 PM

    @pi-user set env variable

    export config=???

    ??? Is new filename, full path if not in config folder

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • P Offline
      pi-user
      last edited by Mar 28, 2020, 8:08 PM

      @sdetweil said in After need take another config.js:

      export config

      Where can I put export config? So, that means that I can take another configuration file if necessary?

      S 1 Reply Last reply Mar 28, 2020, 8:10 PM Reply Quote 0
      • S Away
        sdetweil @pi-user
        last edited by Mar 28, 2020, 8:10 PM

        @pi-user in the terminal window or script. If pm2 then in installers/mm.sh

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • P Offline
          pi-user
          last edited by Mar 28, 2020, 8:13 PM

          @sdetweil said in After need take another config.js:

          mm.sh

          I discovered that the file name is defined in the check_config.js file!

          /opt/magic_mirror/tests/configs/check_config.js

          function getConfigFile() {
          // FIXME: This function should be in core. Do you want refactor me ;) ?, be good!
          rootPath = path.resolve(__dirname + “/…/…/”);
          var configFileName = path.resolve(rootPath + “/config/config.js”);
          if (process.env.MM_CONFIG_FILE) {
          configFileName = path.resolve(process.env.MM_CONFIG_FILE);
          }
          return configFileName;
          }

          S 1 Reply Last reply Mar 28, 2020, 8:40 PM Reply Quote 0
          • S Away
            sdetweil @pi-user
            last edited by Mar 28, 2020, 8:40 PM

            @pi-user in electron.js is says process.env.config

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            P 2 Replies Last reply Mar 30, 2020, 6:25 AM Reply Quote 0
            • P Offline
              pi-user @sdetweil
              last edited by Mar 30, 2020, 6:25 AM

              @sdetweil

              Thank you

              1 Reply Last reply Reply Quote 0
              • P Offline
                pi-user @sdetweil
                last edited by Mar 30, 2020, 7:16 AM

                @sdetweil

                I looked at it. But how can I edit this file so that another config file is read? Such as: configXYZ.js and not the standard name config.js

                Thank you

                S 1 Reply Last reply Mar 30, 2020, 11:49 AM Reply Quote 0
                • S Away
                  sdetweil @pi-user
                  last edited by Mar 30, 2020, 11:49 AM

                  @pi-user just copy the default config.sample.js to anyname.js

                  then edit that name and do

                  export config=anyname.js
                  npm start

                  if using pm2, then edit the installers/mm.sh file which what pm2 starts
                  and add the export= line

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  P 1 Reply Last reply Mar 30, 2020, 12:49 PM Reply Quote 0
                  • P Offline
                    pi-user @sdetweil
                    last edited by Mar 30, 2020, 12:49 PM

                    @sdetweil

                    Thank you:thumbs_up_light_skin_tone:

                    1 Reply Last reply Reply Quote 0
                    • S Away
                      sdetweil
                      last edited by Mar 30, 2020, 2:10 PM

                      it doesn’t work… trying to resolve

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/12
                        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