사소한 리팩토링

This commit is contained in:
static committed 2026-10-20 03:12:53 +09:00
1 parent d986493431
commit 48bf9c1165
62 files changed
+31 -39

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { BASE_URL } from "./app.ts";
// Waits until the app is ready (e.g. migrations are done)
export default async function globalSetup() {
for (let i = 0; i < 120; i++) {
try {
const res = await fetch(`${BASE_URL}/auth/login`);
if (res.ok) return;
} catch {
// Not ready yet
}
await new Promise((resolve) => setTimeout(resolve, 500));
}
throw new Error("The app didn't start");
}