9 lines
234 B
TypeScript
9 lines
234 B
TypeScript
import { Database } from "bun:sqlite"
|
|
import { drizzle } from "drizzle-orm/bun-sqlite"
|
|
|
|
export function init(path: string) {
|
|
const sqlite = new Database(path, { create: true })
|
|
const db = drizzle({ client: sqlite })
|
|
return db
|
|
}
|