Project import from github
This commit is contained in:
commit
0add58254d
179 changed files with 23756 additions and 0 deletions
15
shared/utils/db/index.ts
Normal file
15
shared/utils/db/index.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Global database connection
|
||||
|
||||
import { drizzle } from "drizzle-orm/node-postgres";
|
||||
import { Pool } from "pg";
|
||||
|
||||
import env from "../env";
|
||||
import * as schema from "./schema";
|
||||
|
||||
const pool = new Pool({
|
||||
connectionString: env.DATABASE_URL,
|
||||
});
|
||||
|
||||
const db = drizzle({ client: pool, casing: "snake_case", schema });
|
||||
|
||||
export default db;
|
||||
Loading…
Add table
Add a link
Reference in a new issue