Read the statement by Michael Teeuw here.
After need take another config.js
-
-
@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