mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
15 lines
435 B
TypeScript
15 lines
435 B
TypeScript
import { Client } from "pg";
|
|
import { config } from "config-manager";
|
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
import * as schema from "./schema";
|
|
|
|
export const client = new Client({
|
|
host: config.database.host,
|
|
port: Number(config.database.port),
|
|
user: config.database.username,
|
|
password: config.database.password,
|
|
database: config.database.database,
|
|
});
|
|
|
|
export const db = drizzle(client, { schema });
|