titles/drizzle/db.ts
ChrQR 98ffb58cdb
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 2m21s
added drizzle and connected to vercel
2024-05-16 14:37:35 +02:00

11 lines
289 B
TypeScript

import "@/drizzle/envConfig";
import { drizzle } from "drizzle-orm/vercel-postgres";
import { sql } from "@vercel/postgres";
import * as schema from "./schema";
export const db = drizzle(sql, { schema });
export const getUsers = async () => {
return db.query.UsersTable.findMany();
};