Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Sep 16, 2024
1 parent 86f5793 commit 191996c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dev": "pnpm -r do-dev",
"build": "pnpm -r do-build",
"rm": "node ./scripts/rm.js",
"migrate": "pnpm dlx prisma migrate dev --schema ./packages/canyon-backend/prisma/schema.prisma",
"migrate": "prisma migrate dev --schema ./packages/canyon-backend/prisma/schema.prisma",
"preinstall": "node ./scripts/check.js",
"prepare": "husky"
},
Expand All @@ -21,4 +21,4 @@
"husky": "^9.1.6",
"prisma": "5.16.1"
}
}
}
3 changes: 1 addition & 2 deletions packages/canyon-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"canyon-data": "0.1.1-alpha.8",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"cookie-parser": "^1.4.6",
"dayjs": "^1.11.13",
"diff": "^7.0.0",
"dotenv": "^16.4.5",
Expand Down Expand Up @@ -72,4 +71,4 @@
"tsconfig-paths": "^4.2.0",
"typescript": "^5.6.2"
}
}
}
6 changes: 3 additions & 3 deletions packages/canyon-backend/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { NestFactory } from "@nestjs/core";
import { json } from "express";
import { ValidationPipe } from "@nestjs/common";
import * as cookieParser from "cookie-parser";
import * as dotenv from "dotenv";
import * as path from "node:path";

dotenv.config({
path: path.resolve(__dirname, "../../../.env"),
});

async function bootstrap() {
const { AppModule } = await import("./app.module");
const app = await NestFactory.create(AppModule);
app.use(cookieParser());
app.useGlobalPipes(new ValidationPipe());
app.use(
json({
limit: "100mb",
}),
);
app.enableCors();
await app.listen(8080);
await app.listen(process.env["PORT"] || 8080);
}
bootstrap();

0 comments on commit 191996c

Please sign in to comment.