* chore(release): v5.1.0

* feat: implement resume thumbnails

* fix: remove unused mcp tools

* docs: fix formatting of docs
This commit is contained in:
Amruth Pillai
2026-05-07 15:12:33 +02:00
committed by GitHub
parent 51c366310e
commit 50ba37a27f
1015 changed files with 106087 additions and 141872 deletions
+32
View File
@@ -0,0 +1,32 @@
import type { NodePgDatabase } from "drizzle-orm/node-postgres";
import { drizzle } from "drizzle-orm/node-postgres";
import { Pool } from "pg";
import { env } from "@reactive-resume/env/server";
import { relations } from "./relations";
import * as schema from "./schema";
declare global {
var __pool: Pool | undefined;
var __drizzle: NodePgDatabase<typeof schema> | undefined;
}
function getPool() {
if (!globalThis.__pool) {
globalThis.__pool = new Pool({ connectionString: env.DATABASE_URL });
}
return globalThis.__pool;
}
function makeDrizzleClient() {
const pool = getPool();
return drizzle({ client: pool, schema, relations });
}
export function createDatabase() {
if (!globalThis.__drizzle) {
globalThis.__drizzle = makeDrizzleClient();
}
return globalThis.__drizzle;
}
export const db = createDatabase();