flowstate/db/index.ts
Chneemann a60851ac07
All checks were successful
Deploy Flowstate to VPS / deploy (push) Successful in 1m27s
refactor(lib): consolidate services, types, utils, and actions into lib folder and update import paths
2026-08-23 16:44:18 +02:00

15 lines
507 B
TypeScript

/**
* @file app/db/index.ts
* @description Initializes the PostgreSQL database connection using postgres-js and configures the Drizzle ORM instance.
*/
import { drizzle } from "drizzle-orm/postgres-js";
import * as schema from "./schema";
import postgres from "postgres";
const client = postgres(process.env.DATABASE_URL!, { prepare: false });
/**
* The Drizzle ORM database instance configured for PostgreSQL with type definitions from the schema.
*/
export const db = drizzle(client, { schema });