scira-chat / lib /db /index.ts
mukaddamzaid's picture
init commit
5012205
raw
history blame
353 Bytes
import { drizzle } from "drizzle-orm/neon-serverless";
import { Pool } from "@neondatabase/serverless";
import * as schema from "./schema";
// Initialize the connection pool
const pool = new Pool({
connectionString: process.env.DATABASE_URL,
});
// Initialize Drizzle with the connection pool and schema
export const db = drizzle(pool, { schema });