chore: 更新.gitignore并添加新文件
在.gitignore中添加对*.png、*.log、*-lock.json、*.woff2文件的忽略规则,并新增OFL.txt文件。同时,添加vue.svg图标文件以支持前端展示。更新多个TypeScript文件以优化代码格式和增强可读性。
This commit is contained in:
13
src/main.ts
13
src/main.ts
@@ -6,19 +6,20 @@ async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, {
|
||||
bodyParser: true,
|
||||
});
|
||||
|
||||
|
||||
// 使用自定义日志服务
|
||||
const logger = await app.resolve(CustomLogger);
|
||||
app.useLogger(logger);
|
||||
|
||||
|
||||
// 增加请求体大小限制(默认 100kb,增加到 50mb)
|
||||
const express = require('express');
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const express = require('express') as typeof import('express');
|
||||
app.use(express.json({ limit: '50mb' }));
|
||||
app.use(express.urlencoded({ limit: '50mb', extended: true }));
|
||||
|
||||
|
||||
// 启用 CORS
|
||||
app.enableCors();
|
||||
|
||||
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
bootstrap();
|
||||
void bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user