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:
parent
62dcc37b28
commit
00e359b412
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue