Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Jan 14, 2025
1 parent 420f6c8 commit 0a56652
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/canyon-backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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);
Expand Down

0 comments on commit 0a56652

Please sign in to comment.