"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",
|
name: "on-server-start",
|
||||||
hooks: {
|
hooks: {
|
||||||
"astro:server:start": async () => {
|
"astro:config:done": () => {
|
||||||
await fetch(`http://${ASTRO_HOST}:${ASTRO_PORT}/en/api/on-startup`);
|
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