fix(mpc-service): 直接从环境变量读取配置

ConfigService.get('port') 读取不到嵌套配置
改为直接使用 process.env.APP_PORT

修复服务监听错误端口 (6379 -> 3006)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Developer 2025-12-02 10:29:59 -08:00
parent 62dcc37b28
commit 00e359b412
1 changed files with 3 additions and 3 deletions

View File

@ -20,9 +20,9 @@ async function bootstrap() {
// Get config service
const configService = app.get(ConfigService);
const port = configService.get<number>('port', 3006);
const apiPrefix = configService.get<string>('apiPrefix', 'api/v1');
const env = configService.get<string>('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);