modules/0-ui
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import pg from "pg";
|
||||
|
||||
const { Pool } = pg;
|
||||
|
||||
export const pool = new Pool({
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
max: parseInt(process.env.PG_POOL_MAX || "10", 10),
|
||||
idleTimeoutMillis: parseInt(process.env.PG_IDLE_TIMEOUT_MS || "30000", 10),
|
||||
connectionTimeoutMillis: parseInt(process.env.PG_CONN_TIMEOUT_MS || "5000", 10),
|
||||
});
|
||||
|
||||
pool.on("error", (err) => {
|
||||
console.error("[pg pool] unexpected error:", err);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { pool } from "./pool.js";
|
||||
import { pool } from "../../shared/db/pool.js";
|
||||
|
||||
export async function ensureTenant({ key, name }) {
|
||||
const q = `
|
||||
|
||||
Reference in New Issue
Block a user