mirror of
https://git.suyu.dev/suyu/website.git
synced 2025-12-30 19:24:34 +01:00
basic db boilerplate + type safety for api
This commit is contained in:
parent
b91e72626f
commit
c5686166d7
15 changed files with 269 additions and 12 deletions
11
src/hooks.server.ts
Normal file
11
src/hooks.server.ts
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue