first
This commit is contained in:
commit
0738070ce1
287 changed files with 10116 additions and 0 deletions
6
src/lib/server/db/index.js
Normal file
6
src/lib/server/db/index.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { env } from "$env/dynamic/private";
|
||||
import { drizzle } from "drizzle-orm/postgres-js";
|
||||
import postgres from "postgres";
|
||||
if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set");
|
||||
const client = postgres(env.DATABASE_URL);
|
||||
export const db = drizzle(client, { casing: "snake_case" });
|
Loading…
Add table
Add a link
Reference in a new issue