Skip to content

Commit

Permalink
chore: 배포 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongHyeon0409 committed Nov 11, 2024
1 parent 6e15eaa commit 030b784
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main.js",
"start:prod": "node dist/src/main.js",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
Expand All @@ -22,7 +22,7 @@
"dependencies": {
"@nestjs/axios": "^3.1.2",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/core": "^10.4.7",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/platform-socket.io": "^10.4.7",
"@nestjs/typeorm": "9.0.0",
Expand Down
20 changes: 5 additions & 15 deletions packages/server/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';

async function bootstrap() {
const app = await NestFactory.create(AppModule);

app.enableCors({
origin: ['http://localhost:5173', 'http://175.106.98.147'], // 허용할 클라이언트 주소
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true,
});
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,
transform: true,
transformOptions: {
enableImplicitConversion: true,
},
}),
);
// app.enableCors({
// origin: ['http://localhost:5173', 'http://175.106.98.147'], // 허용할 클라이언트 주소
// methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
// credentials: true,
// });

await app.listen(process.env.PORT ?? 3000);
}
Expand Down
1 change: 1 addition & 0 deletions packages/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"target": "ES2021",
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
Expand Down

0 comments on commit 030b784

Please sign in to comment.