adds dotEnv config

This commit is contained in:
Jonathan Tsai 2020-12-29 02:14:43 +00:00
parent 28440fea78
commit b6b50a102b
2 changed files with 4 additions and 2 deletions

View File

@ -32,6 +32,8 @@
}
},
"dotenv": true,
"storage": {
"type": "file"
},

View File

@ -46,8 +46,8 @@ if (!config.storage.type) {
var Store, preferredStore;
if (config.storage.password == '.env') {
config.storage.password = process.env.STORAGE_PASSWORD
if (config.dotEnv) {
config.storage.password = process.env.STORAGE_PASSWORD;
}
if (process.env.REDISTOGO_URL && config.storage.type === 'redis') {