From 00e359b412c36a0dcfacb093fd9f67358b3608be Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 2 Dec 2025 10:29:59 -0800 Subject: [PATCH] =?UTF-8?q?fix(mpc-service):=20=E7=9B=B4=E6=8E=A5=E4=BB=8E?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E8=AF=BB=E5=8F=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ConfigService.get('port') 读取不到嵌套配置 改为直接使用 process.env.APP_PORT 修复服务监听错误端口 (6379 -> 3006) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/services/mpc-service/src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/services/mpc-service/src/main.ts b/backend/services/mpc-service/src/main.ts index 4efdde5b..2975d6b3 100644 --- a/backend/services/mpc-service/src/main.ts +++ b/backend/services/mpc-service/src/main.ts @@ -20,9 +20,9 @@ async function bootstrap() { // Get config service const configService = app.get(ConfigService); - const port = configService.get('port', 3006); - const apiPrefix = configService.get('apiPrefix', 'api/v1'); - const env = configService.get('env', 'development'); + const port = parseInt(process.env.APP_PORT || '3006', 10); + const apiPrefix = process.env.API_PREFIX || 'api/v1'; + const env = process.env.NODE_ENV || 'development'; // Set global prefix app.setGlobalPrefix(apiPrefix);