pkgs/db/src/index.ts (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import { createClient } from "@libsql/client";
import config from "@stealth-developers/config";
import { drizzle } from "drizzle-orm/libsql";
import * as schema from "./schemas";
import * as relations from "./schemas/relations";
const client = createClient({
url: config.db.url,
});
export const db = drizzle({
client,
schema,
relations: relations.default,
});
export * from "./schemas";
export * from "./utils";
export * from "drizzle-orm";
export default db;
|