From 0a566521bbc476473c6cd01d42d806bed6b399ed Mon Sep 17 00:00:00 2001 From: zhangtao25 Date: Tue, 14 Jan 2025 20:27:03 +0800 Subject: [PATCH] chore: daily development --- packages/canyon-backend/src/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/canyon-backend/src/main.ts b/packages/canyon-backend/src/main.ts index 8847c2d0..8cc9fd6c 100755 --- a/packages/canyon-backend/src/main.ts +++ b/packages/canyon-backend/src/main.ts @@ -2,6 +2,7 @@ import { NestFactory } from "@nestjs/core"; import { ValidationPipe } from "@nestjs/common"; import * as dotenv from "dotenv"; import * as path from "node:path"; +import { json } from "express"; dotenv.config({ path: path.resolve(__dirname, "../../../.env"), @@ -10,6 +11,11 @@ dotenv.config({ async function bootstrap() { const { AppModule } = await import("./app.module"); const app = await NestFactory.create(AppModule); + app.use( + json({ + limit: "50mb", + }), + ); app.useGlobalPipes(new ValidationPipe()); app.enableCors(); await app.listen(process.env["PORT"] || 8080);