installing drizzle, confirm working db connection via test script
This commit is contained in:
parent
681c6d2b4f
commit
3faa3d4ffb
5 changed files with 1068 additions and 60 deletions
11
packages/db/src/index.ts
Normal file
11
packages/db/src/index.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { config } from "dotenv";
|
||||
import { drizzle } from "drizzle-orm/node-postgres";
|
||||
import { resolve } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { dirname } from "path";
|
||||
|
||||
config({
|
||||
path: resolve(dirname(fileURLToPath(import.meta.url)), "../../../.env"),
|
||||
});
|
||||
|
||||
export const db = drizzle(process.env["DATABASE_URL"]!);
|
||||
Loading…
Add table
Add a link
Reference in a new issue