mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Setup drizzle
This commit is contained in:
parent
ad8673a46f
commit
7eaf1e1729
BIN
api/bun.lockb
BIN
api/bun.lockb
Binary file not shown.
@ -8,9 +8,13 @@
|
||||
"test": "bun test"
|
||||
},
|
||||
"dependencies": {
|
||||
"elysia": "latest"
|
||||
"@elysiajs/swagger": "^1.1.5",
|
||||
"drizzle-orm": "^0.35.3",
|
||||
"elysia": "latest",
|
||||
"pg": "^8.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/pg": "^8.11.10",
|
||||
"bun-types": "latest"
|
||||
},
|
||||
"module": "src/index.js"
|
||||
|
9
api/src/db/index.ts
Normal file
9
api/src/db/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { drizzle } from "drizzle-orm/node-postgres";
|
||||
|
||||
const db = drizzle({
|
||||
connection: {
|
||||
connectionString: process.env.DATABASE_URL!,
|
||||
ssl: true,
|
||||
},
|
||||
casing: "snake_case",
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user