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": { "storage": {
"type": "file" "type": "file"
}, },

View File

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