Desinger-System / lib /db /src /index.ts
o134's picture
Upload folder using huggingface_hub
1804b24 verified
Raw
History Blame Contribute Delete
385 Bytes
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";
const connectionString = process.env.DATABASE_URL;
if (!connectionString) {
throw new Error("DATABASE_URL environment variable is not set");
}
const client = postgres(connectionString);
export const db = drizzle(client, { schema });
export * from "./schema";