← back to Lawyer Directory Builder
src/db/pool.ts
18 lines
// Thin re-export from directory-core/db.
//
// Migrated 2026-05-04 (tick 21 of overnight YOLO loop) — 30 LOC reduced to a
// single re-export. All 15+ consumers continue to import from this file via
// their existing relative paths (`../db/pool.ts`, `../../db/pool.ts`); they
// don't need to change.
//
// The original implementation was the source-of-truth that became
// directory-core/db.ts in Phase 1. Re-exporting closes the loop: lawyer-directory
// is now a normal consumer of its own donated module, and any future fix to
// pool/query/withTx lands once in directory-core and benefits all 4 verticals.
//
// DATABASE_URL is set in lawyer-directory's .env; directory-core/db reads it
// via its `import 'dotenv/config'` (which only loads from the *consumer*'s
// CWD, not directory-core's own dir).
export { pool, query, withTx, closePool } from 'directory-core/db';