"Fix" on server startup script on prod
This commit is contained in:
parent
9105b04032
commit
f7d994dcb8
|
@ -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);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue