feat(backend): scaffold Express API with health and module layout
Add src/routes/notifications, services/pushService, models/device, scheduler stubs, and entrypoint with GET /health and startup log.
This commit is contained in:
16
src/scheduler.ts
Normal file
16
src/scheduler.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
let intervalId: ReturnType<typeof setInterval> | undefined;
|
||||
|
||||
export function startScheduler(): void {
|
||||
if (intervalId !== undefined) return;
|
||||
// TODO: replace with job queue or cron for wake-up checks
|
||||
intervalId = setInterval(() => {
|
||||
// placeholder tick
|
||||
}, 60_000);
|
||||
}
|
||||
|
||||
export function stopScheduler(): void {
|
||||
if (intervalId !== undefined) {
|
||||
clearInterval(intervalId);
|
||||
intervalId = undefined;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user