From 88f9afbd7ba17e5766c2738c13107034a80c5246 Mon Sep 17 00:00:00 2001 From: luocq3 Date: Wed, 28 Feb 2024 22:42:25 +0800 Subject: [PATCH] fix: The DATA_CENTER_URL configuration cannot be read in the prod environment --- config/config.default.ts | 2 ++ config/config.local.ts | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config/config.default.ts b/config/config.default.ts index 20bf13e..c189444 100644 --- a/config/config.default.ts +++ b/config/config.default.ts @@ -19,6 +19,8 @@ export default (appInfo) => { const config = {} as PowerPartial; config.dataCenter = { + host: process.env.DATA_CENTER_URL || 'http://localhost:1337', + sessionKeyPrefix: 'lowcode:data:', developerToken: 'developer' }; // override config from framework / plugin diff --git a/config/config.local.ts b/config/config.local.ts index e0def69..b96ef02 100644 --- a/config/config.local.ts +++ b/config/config.local.ts @@ -13,10 +13,6 @@ import { EggAppConfig, PowerPartial } from 'egg'; export default () => { const config: PowerPartial = {}; - config.dataCenter = { - host: process.env.DATA_CENTER_URL || 'http://localhost:1337', - sessionKeyPrefix: 'lowcode:data:' - }; - + return config; };