Skip to content

SQLite

Source: packages/better-auth/src/SQLite.ts Kind: Layer · Provides: BetterAuth.Database

Local bun:sqlite database layer for Better Auth — development and tests on the bun runtime only (a deployed Worker/Lambda cannot open a local SQLite file).

Data persists in the file across runs; migrations run against the same file at deploy time.

import { BetterAuth } from "@alchemy.run/better-auth";
import { SQLite } from "@alchemy.run/better-auth/SQLite";
Effect.gen(function* () {
const auth = yield* BetterAuth({ emailAndPassword: { enabled: true } });
// ...
}).pipe(Effect.provide(SQLite(".alchemy/auth.sqlite")))