Allow .env override in payment config

master
Mark Moffat 2019-12-16 18:28:52 +10:30
parent 801314f230
commit 13e25251c7
1 changed files with 7 additions and 0 deletions

View File

@ -249,6 +249,13 @@ const getPaymentConfig = () => {
config = Object.assign(config, localConfigObj); config = Object.assign(config, localConfigObj);
} }
// Override from .env file
Object.keys(config).forEach((configKey) => {
if(process.env[configKey]){
config[configKey] = process.env[configKey];
}
});
return config; return config;
}; };