first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
15
packages/database/drizzle/client.ts
Normal file
15
packages/database/drizzle/client.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { drizzle } from "drizzle-orm/node-postgres";
|
||||
import * as schema from "./schema/postgres";
|
||||
|
||||
// Check the drizzle documentation for more information on how to connect to your preferred database provider
|
||||
// https://orm.drizzle.team/docs/get-started-postgresql
|
||||
|
||||
const databaseUrl = process.env.DATABASE_URL as string;
|
||||
|
||||
if (!databaseUrl) {
|
||||
throw new Error("DATABASE_URL is not set");
|
||||
}
|
||||
|
||||
export const db = drizzle(databaseUrl, {
|
||||
schema,
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue