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/');