The init() Hook
Run one-time server initialization code when the SvelteKit server starts.
What init Does
The init hook runs once when the SvelteKit server starts up, before any request.
Export init
From hooks.server.js.
export async function init() {
await connectDb();
console.log("Server ready");
}