From 674cec7502233d8e4904b2a719168379a4b5b442 Mon Sep 17 00:00:00 2001 From: Jonathan Tsai Date: Tue, 29 Dec 2020 02:28:05 +0000 Subject: [PATCH] change config value to useDotenv --- config.js | 2 +- server.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 5562f02..6faace3 100644 --- a/config.js +++ b/config.js @@ -32,7 +32,7 @@ } }, - "dotenv": true, + "useDotenv": true, "storage": { "type": "file" diff --git a/server.js b/server.js index 8558b6f..86e764a 100644 --- a/server.js +++ b/server.js @@ -16,7 +16,7 @@ const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); config.port = process.env.PORT || config.port || 7777; config.host = process.env.HOST || config.host || 'localhost'; -if (config.dotEnv) { +if (config.useDotenv) { require('dotenv').config(); } @@ -48,7 +48,7 @@ if (!config.storage.type) { var Store, preferredStore; -if (config.dotEnv) { +if (config.useDotenv) { config.storage.password = process.env.STORAGE_PASSWORD; }