perf: code

This commit is contained in:
archer
2023-09-01 11:47:06 +08:00
parent 68cdf50cb6
commit 23cc2f81e9
8 changed files with 61 additions and 68 deletions

View File

@@ -88,6 +88,8 @@ const defaultVectorModels: VectorModelItemType[] = [
export async function getInitConfig() {
try {
if (global.feConfigs) return;
const filename =
process.env.NODE_ENV === 'development' ? 'data/config.local.json' : '/app/data/config.json';
const res = JSON.parse(readFileSync(filename, 'utf-8'));