Skip to content

Commit

Permalink
Refactor: 서버 포트를 정수형으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
pp449 committed Jul 26, 2023
1 parent 89ae58d commit a15894b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import dotenv from 'dotenv';
dotenv.config();

export default {
SERVER_PORT: process.env.SERVER_PORT,
SERVER_PORT: parseInt(process.env.SERVER_PORT, 10),
CLIENT_PATH: process.env.CLIENT_PATH,
DB_HOST: process.env.DATABASE_HOST,
DB_USER: process.env.DATABASE_USER,
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ app.get('/test', (req: Request, res: Response) => {
app.listen(env.SERVER_PORT, () => {
console.log('서버 실행중');
});

console.log(process.env.SERVER_PORT);

0 comments on commit a15894b

Please sign in to comment.