feat: log startup success and swagger address
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2f839f714f
commit
0a0f999589
14
src/main.ts
14
src/main.ts
@ -13,13 +13,19 @@ async function bootstrap(): Promise<void> {
|
||||
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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user