import { drizzle } from "drizzle-orm/libsql/node";
import { DATA_DIR } from "@lib/env.ts";
import path from "node:path";

const DB_FILE = "file:" + path.resolve(DATA_DIR, "db.sqlite");

// You can specify any property from the libsql connection options
export const db = drizzle({
  connection: {
    url: DB_FILE,
  },
});
