recator placement of code

This commit is contained in:
2026-02-17 11:46:57 -06:00
parent 31f8c368d9
commit 23c000fa7f
77 changed files with 4528 additions and 2697 deletions

View File

@@ -0,0 +1,16 @@
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
const dbURL = `postgres://${process.env.DATABASE_USER}:${process.env.DATABASE_PASSWORD}@${process.env.DATABASE_HOST}:${process.env.DATABASE_PORT}/${process.env.DATABASE_DB}`;
const queryClient = postgres(dbURL, {
max: 10,
idle_timeout: 60,
connect_timeout: 30,
max_lifetime: 1000 * 6 * 5,
onnotice: (n) => {
console.info("PG notice: ", n.message);
},
});
export const db = drizzle({ client: queryClient });