mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-12 01:36:54 +02:00
Replaced `@neondatabase/serverless` with `pg` for database connections in `server/db.ts`, updating the `drizzle` initialization accordingly. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/Yxw6kHP
12 lines
378 B
TypeScript
12 lines
378 B
TypeScript
import { Pool } from 'pg';
|
|
import { drizzle } from 'drizzle-orm/node-postgres';
|
|
import * as schema from "@shared/schema";
|
|
|
|
if (!process.env.DATABASE_URL) {
|
|
throw new Error(
|
|
"DATABASE_URL must be set. Did you forget to provision a database?",
|
|
);
|
|
}
|
|
|
|
export const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
|
export const db = drizzle(pool, { schema }); |