Skip to content

Commit 7959cb3

Browse files
committed
modify: index 파일 모듈화, 고도화, 리펙토링, 린팅
1 parent 0a83c21 commit 7959cb3

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/app.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ app.use(express.urlencoded({ extended: true, limit: '10mb' }));
3030

3131
app.use(
3232
cors({
33-
origin: process.env.NODE_ENV === 'production'
34-
? process.env.ALLOWED_ORIGINS?.split(',').map(origin => origin.trim())
35-
: 'http://localhost:3000',
33+
origin:
34+
process.env.NODE_ENV === 'production'
35+
? process.env.ALLOWED_ORIGINS?.split(',').map((origin) => origin.trim())
36+
: 'http://localhost:3000',
3637
methods: ['GET', 'POST'],
3738
allowedHeaders: ['Content-Type', 'Authorization', 'Cookie', 'access_token', 'refresh_token'],
3839
credentials: true,
@@ -49,8 +50,8 @@ app.get('/health', async (req: Request, res: Response) => {
4950
environment: process.env.NODE_ENV,
5051
services: {
5152
sentry: false,
52-
cache: false
53-
}
53+
cache: false,
54+
},
5455
};
5556

5657
// Sentry 상태 확인
@@ -86,4 +87,4 @@ app.use((req: Request, res: Response, next: NextFunction) => {
8687

8788
app.use(errorHandlingMiddleware);
8889

89-
export default app;
90+
export default app;

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GracefulShutdownManager implements ShutdownHandler {
1616
private isShuttingDown = false;
1717
private readonly shutdownTimeout = 10000; // 10초 강제 종료 타이머
1818

19-
constructor(private server: Server) { }
19+
constructor(private server: Server) {}
2020

2121
/**
2222
* 모든 연결을 안전하게 정리하고 서버를 종료
@@ -186,4 +186,4 @@ const serverManager = new ServerManager();
186186
serverManager.start().catch((error) => {
187187
logger.error('Fatal error during server startup:', error);
188188
process.exit(1);
189-
});
189+
});

0 commit comments

Comments
 (0)