diff --git a/astro.config.ts b/astro.config.ts index 8a7c4bf..a4fd6d8 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -20,8 +20,9 @@ export default defineConfig({ { name: "on-server-start", hooks: { - "astro:server:start": async () => { - await fetch(`http://${ASTRO_HOST}:${ASTRO_PORT}/en/api/on-startup`); + "astro:config:done": () => { + console.log("Running on startup script in 10s...") + setTimeout(() => fetch(`http://${ASTRO_HOST}:${ASTRO_PORT}/en/api/on-startup`), 10_000); }, }, },