16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
import { drizzle } from "drizzle-orm/postgres-js";
|
|
import postgres from "postgres";
|
|
import * as schema from "./schema";
|
|
|
|
export function createDatabase(databaseUrl: string) {
|
|
const client = postgres(databaseUrl, { max: 10 });
|
|
return {
|
|
client,
|
|
db: drizzle(client, { schema }),
|
|
};
|
|
}
|
|
|
|
export * from "./auth-repository";
|
|
export * from "./events";
|
|
export * from "./schema";
|