From fe60c43fba3063ca969c038397d5c7564e28a9cf Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sat, 21 May 2022 14:54:53 +0800 Subject: [PATCH] server: update log info --- packages/server/src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/main.ts b/packages/server/src/main.ts index 16c241d..8850b18 100644 --- a/packages/server/src/main.ts +++ b/packages/server/src/main.ts @@ -13,6 +13,7 @@ async function bootstrap() { logger: false, }); const config = app.get(ConfigService); + const port = config.get('server.port') || 5002; app.enableCors(); app.use(helmet()); @@ -22,8 +23,9 @@ async function bootstrap() { app.useGlobalInterceptors(new HttpResponseTransformInterceptor()); app.useGlobalPipes(new ValidationPipe()); app.setGlobalPrefix(config.get('server.prefix') || '/'); - await app.listen(config.get('server.port') || 4000); - console.log('[think] 主服务启动成功'); + + await app.listen(port); + console.log(`[think] 主服务启动成功,端口:${port}`); } bootstrap();