mirror of https://github.com/fantasticit/think.git
server: update log info
parent
f57e2bf23c
commit
fe60c43fba
|
@ -13,6 +13,7 @@ async function bootstrap() {
|
||||||
logger: false,
|
logger: false,
|
||||||
});
|
});
|
||||||
const config = app.get(ConfigService);
|
const config = app.get(ConfigService);
|
||||||
|
const port = config.get('server.port') || 5002;
|
||||||
|
|
||||||
app.enableCors();
|
app.enableCors();
|
||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
@ -22,8 +23,9 @@ async function bootstrap() {
|
||||||
app.useGlobalInterceptors(new HttpResponseTransformInterceptor());
|
app.useGlobalInterceptors(new HttpResponseTransformInterceptor());
|
||||||
app.useGlobalPipes(new ValidationPipe());
|
app.useGlobalPipes(new ValidationPipe());
|
||||||
app.setGlobalPrefix(config.get('server.prefix') || '/');
|
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();
|
bootstrap();
|
||||||
|
|
Loading…
Reference in New Issue