Skip to content
Snippets Groups Projects
Commit f989f23c authored by Sigmund, Dominik's avatar Sigmund, Dominik
Browse files

Added boolean converter for env variables

parent 78f02859
No related branches found
No related tags found
1 merge request!1Master
...@@ -41,8 +41,10 @@ module.exports = function() { ...@@ -41,8 +41,10 @@ module.exports = function() {
let keys = objectDeepKeys(config) let keys = objectDeepKeys(config)
for (let index = 0; index < keys.length; index++) { for (let index = 0; index < keys.length; index++) {
const element = keys[index] const element = keys[index]
const env = process.env[element.toUpperCase().replace('.', '_')] let env = process.env[element.toUpperCase().replace('.', '_')]
if (env) { if (env) {
env = (env == 'true') ? true : env
env = (env == 'false') ? false : env
set(config, element, env) set(config, element, env)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment