feat: 更新AI提示并增强后端功能
更新AI提示字符串包含海南地区 添加CrawlInfoAdd实体到Bids模块 优化爬虫信息统计查询 增加请求体大小限制和启用CORS 修正前端部署路径
This commit is contained in:
12
src/main.ts
12
src/main.ts
@@ -3,12 +3,22 @@ import { AppModule } from './app.module';
|
||||
import { CustomLogger } from './common/logger/logger.service';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
const app = await NestFactory.create(AppModule, {
|
||||
bodyParser: true,
|
||||
});
|
||||
|
||||
// 使用自定义日志服务
|
||||
const logger = await app.resolve(CustomLogger);
|
||||
app.useLogger(logger);
|
||||
|
||||
// 增加请求体大小限制(默认 100kb,增加到 50mb)
|
||||
const express = require('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();
|
||||
|
||||
Reference in New Issue
Block a user