로컬(개발)용과 운영용 설정분리

This commit is contained in:
2025-12-28 13:45:41 +09:00
parent a871ec8008
commit 716f4f8791
15 changed files with 661 additions and 368 deletions

View File

@@ -1,8 +1,12 @@
import { shouldAutoStartScheduler } from '../utils/db'
import { startServerScheduler } from '../utils/server-scheduler'
export default defineNitroPlugin(() => {
// 서버 시작 시 스케줄러 자동 시작
startServerScheduler()
console.log('[Server] Plugin initialized - scheduler auto-started')
// 스케줄러 자동 시작 (환경에 따라)
if (shouldAutoStartScheduler()) {
startServerScheduler()
console.log('[Server] Plugin initialized - scheduler auto-started (production mode)')
} else {
console.log('[Server] Plugin initialized - scheduler NOT started (development mode - use API to start)')
}
})