diff --git a/src/main.ts b/src/main.ts index 30a4efd..e2dd848 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,13 +13,19 @@ async function bootstrap(): Promise { app.useLogger(app.get(Logger)); const swaggerConfig = new DocumentBuilder() - .setTitle('sysmgr API') - .setDescription('通用系统管理脚手架 API 文档') + .setTitle('系统管理 API') + .setDescription('投云科技系统管理 API 文档') .setVersion('1.0') .addBearerAuth() .build(); - SwaggerModule.setup('docs', app, SwaggerModule.createDocument(app, swaggerConfig)); + SwaggerModule.setup( + 'docs', + app, + SwaggerModule.createDocument(app, swaggerConfig), + ); - await app.listen(process.env.PORT ?? 3000); + const port = Number(process.env.PORT ?? 3000); + await app.listen(port); + app.get(Logger).log(`服务启动成功,端口 ${port},Swagger 文档: http://localhost:${port}/docs`); } await bootstrap();