Setup drizzle

This commit is contained in:
Zoe Roux 2024-10-24 21:34:10 +02:00
parent ad8673a46f
commit 7eaf1e1729
No known key found for this signature in database
3 changed files with 14 additions and 1 deletions

Binary file not shown.

View File

@ -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
View 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",
});