hy2-panel/instrumentation.ts
2026-04-14 18:05:32 +08:00

12 lines
258 B
TypeScript

export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
const [{ ensureDb }, { startPoller }] = await Promise.all([
import("@/lib/db"),
import("@/lib/poller"),
]);
await ensureDb();
startPoller();
}
}