feat(db): add PostgreSQL connection and schema definitions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { drizzle } from "npm:drizzle-orm/node-postgres";
|
||||
import pg from "npm:pg";
|
||||
|
||||
const { Pool } = pg;
|
||||
|
||||
const pool = new Pool({
|
||||
host: Deno.env.get("POSTGRES_HOST"),
|
||||
port: Number(Deno.env.get("POSTGRES_PORT") ?? 5432),
|
||||
user: Deno.env.get("POSTGRES_USER"),
|
||||
password: Deno.env.get("POSTGRES_PASS"),
|
||||
database: Deno.env.get("POSTGRES_DB"),
|
||||
});
|
||||
|
||||
export const db = drizzle(pool);
|
||||
Reference in New Issue
Block a user