basic db boilerplate + type safety for api

This commit is contained in:
not-nullptr 2024-03-10 03:18:28 +00:00
parent b91e72626f
commit c5686166d7
15 changed files with 269 additions and 12 deletions

11
src/hooks.server.ts Normal file
View file

@ -0,0 +1,11 @@
import { db } from "$lib/server/db";
import "reflect-metadata";
import { building } from "$app/environment";
const runAllTheInitFunctions = async () => {
await db.initialize();
};
if (!building) {
await runAllTheInitFunctions();
}