From 55ffd85d482e91e6de66188c59a6b05523950f22 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 18 Jul 2022 16:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=8A=A0=E8=BD=BD=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/config/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/back/config/index.ts b/back/config/index.ts index 2aa8a8a4..446b3f73 100644 --- a/back/config/index.ts +++ b/back/config/index.ts @@ -16,8 +16,9 @@ if (!process.env.QL_DIR) { const lastVersionFile = `http://qn.whyour.cn/version.ts?v=${Date.now()}`; -const envFound = dotenv.config(); const rootPath = process.env.QL_DIR as string; +const envFound = dotenv.config({ path: path.join(rootPath, '.env') }); + const dataPath = path.join(rootPath, 'data/'); const samplePath = path.join(rootPath, 'sample/'); const configPath = path.join(dataPath, 'config/');