Database init
This commit is contained in:
parent
1e5497b3c2
commit
55a112415d
1 changed files with 2 additions and 2 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import type { Handle } from '@sveltejs/kit';
|
||||
import { dev } from '$app/environment';
|
||||
import { dev, building } from '$app/environment';
|
||||
import { db } from '$lib/db';
|
||||
import { env } from '$env/dynamic/private';
|
||||
|
||||
// Flag to ensure startup tasks only run once
|
||||
|
||||
export async function init() {
|
||||
if (!env.DATABASE_URL) return;
|
||||
if (building) return; // Om den er i bygget steget så hopper vi over
|
||||
|
||||
console.log('🚀 Initializing server...');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue