동적 API URL 설정
This commit is contained in:
@@ -29,7 +29,7 @@ app.use(express.urlencoded({ extended: true, limit: "10mb" }));
|
||||
// CORS 설정
|
||||
app.use(
|
||||
cors({
|
||||
origin: config.cors.origin.split(',').map(url => url.trim()),
|
||||
origin: config.cors.origin.split(",").map((url) => url.trim()),
|
||||
credentials: true,
|
||||
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
|
||||
allowedHeaders: ["Content-Type", "Authorization", "X-Requested-With"],
|
||||
@@ -84,11 +84,13 @@ app.use(errorHandler);
|
||||
|
||||
// 서버 시작
|
||||
const PORT = config.port;
|
||||
const HOST = config.host;
|
||||
|
||||
app.listen(PORT, () => {
|
||||
logger.info(`🚀 Server is running on port ${PORT}`);
|
||||
app.listen(PORT, HOST, () => {
|
||||
logger.info(`🚀 Server is running on ${HOST}:${PORT}`);
|
||||
logger.info(`📊 Environment: ${config.nodeEnv}`);
|
||||
logger.info(`🔗 Health check: http://localhost:${PORT}/health`);
|
||||
logger.info(`🔗 Health check: http://${HOST}:${PORT}/health`);
|
||||
logger.info(`🌐 External access: http://39.117.244.52:${PORT}/health`);
|
||||
});
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user