Skip to content

Commit

Permalink
chore: 포트 환경변수로 변환
Browse files Browse the repository at this point in the history
  • Loading branch information
victolee0 committed Nov 22, 2023
1 parent a53b032 commit ee6639e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BE/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ async function bootstrap() {
const configService = new ConfigService();

let httpsOptions = null;
if (configService.get<boolean>('SSL')) {
const ssl = configService.get<string>('SSL');
if (ssl == 'true') {
httpsOptions = {
key: readFileSync(configService.get<string>('HTTPS_KEY_PATH')),
cert: readFileSync(configService.get<string>('HTTPS_CERT_PATH')),
Expand All @@ -29,6 +30,6 @@ async function bootstrap() {

app.useGlobalPipes(new ValidationPipe());

await app.listen(3000);
await app.listen(configService.get<number>('PORT'));
}
bootstrap();

0 comments on commit ee6639e

Please sign in to comment.