Read the statement by Michael Teeuw here.
After need take another config.js
-
In which file is it defined that the config.js file is the main configuration file? Can you define different config.js files? How for example configXYZ.js? So take another config.js as needed?
Many thanks for the help -
-
@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?
-
@pi-user in the terminal window or script. If pm2 then in installers/mm.sh
-
@sdetweil said in After need take another config.js:
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;
} -
@pi-user in electron.js is says process.env.config
-
Thank you
-
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
-
@pi-user just copy the default config.sample.js to anyname.js
then edit that name and do
export config=anyname.js
npm startif using pm2, then edit the installers/mm.sh file which what pm2 starts
and add the export= line -
Thank you:thumbs_up_light_skin_tone:
-
it doesn’t work… trying to resolve
-
if can’t get it to work… MM_CONFIG_FILE (full path to file) reads the right config file, but then
still get missing config file…AND you MUST have a config.js in the config folder, or nothing will work…
sorry, i give up right now…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login