yippee C and R from db works well

This commit is contained in:
2026-01-12 18:16:32 +13:00
parent 8794bd6aea
commit ea173dcc52
9 changed files with 57 additions and 183 deletions

View File

@@ -1,4 +1,4 @@
import 'dotenv/config';
import { drizzle } from 'drizzle-orm/node-postgres';
const db = drizzle(process.env.DATABASE_URL!);
export const db = drizzle(process.env.DATABASE_URL!);

5
src/utils/response.ts Normal file
View File

@@ -0,0 +1,5 @@
export function httpResponse(data: object | null, code: number) {
return new Response(JSON.stringify(data), {
status: code
})
}