blob: 2a152a398a227bc9ea2db0d4c6a2dc3d8ec74306 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { drizzle } from "drizzle-orm/node-postgres";
import * as schema from "./schema.js";
import * as schemaCrdt from "./schema-crdt.js";
const {
POSTGRES_USER,
POSTGRES_PASSWORD,
POSTGRES_DB,
POSTGRES_HOST,
POSTGRES_PORT,
} = process.env;
export const db = drizzle(
`postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}`,
{ schema: { ...schema, ...schemaCrdt } },
);
export * from "./schema.js";
export * from "./schema-crdt.js";
|