MCPcopy
hub / github.com/ixartz/SaaS-Boilerplate / createDbConnection

Function createDbConnection

src/utils/DBConnection.ts:9–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7// Need a database for production? Check out https://get.neon.com/BMFYNtx
8// Tested and compatible with Next.js Boilerplate
9export const createDbConnection = () => {
10 const pool = new Pool({
11 connectionString: Env.DATABASE_URL,
12 });
13
14 pool.on('error', (error) => {
15 logger.error(`Database pool error: ${error.message}`);
16 });
17
18 return drizzle({
19 client: pool,
20 schema,
21 });
22};

Callers 1

DB.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected