change config value to useDotenv

This commit is contained in:
Jonathan Tsai 2020-12-29 02:28:05 +00:00
parent ee6d97fd7f
commit 674cec7502
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@
} }
}, },
"dotenv": true, "useDotenv": true,
"storage": { "storage": {
"type": "file" "type": "file"

View File

@ -16,7 +16,7 @@ const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
config.port = process.env.PORT || config.port || 7777; config.port = process.env.PORT || config.port || 7777;
config.host = process.env.HOST || config.host || 'localhost'; config.host = process.env.HOST || config.host || 'localhost';
if (config.dotEnv) { if (config.useDotenv) {
require('dotenv').config(); require('dotenv').config();
} }
@ -48,7 +48,7 @@ if (!config.storage.type) {
var Store, preferredStore; var Store, preferredStore;
if (config.dotEnv) { if (config.useDotenv) {
config.storage.password = process.env.STORAGE_PASSWORD; config.storage.password = process.env.STORAGE_PASSWORD;
} }