修改环境变量加载路径

This commit is contained in:
whyour 2022-07-18 16:16:12 +08:00
parent 075165f89d
commit 55ffd85d48

View File

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