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