Switch from Node.js + pnpm to Bun runtime and package manager

Replace @libsql/client with bun:sqlite for zero-dependency SQLite access,
swap drizzle-orm/libsql adapter for drizzle-orm/bun-sqlite, and rewrite
Dockerfile to use oven/bun:1-alpine. The raw Database instance is no longer
exported via Proxy (native C++ methods lose `this` binding through
Reflect.get); instead, a closeDatabase() helper handles graceful shutdown
and the health check uses Drizzle's db.run() directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 15:17:57 -05:00
co-authored by Claude Opus 4.6
parent ed6e061436
commit 2fb329e0dc
15 changed files with 3737 additions and 7825 deletions
+3 -2
View File
@@ -1,9 +1,10 @@
import { sql } from "drizzle-orm";
import { NextResponse } from "next/server";
import { client } from "@/lib/db/client";
import { db } from "@/lib/db/client";
export async function GET() {
try {
await client.execute("SELECT 1");
db.run(sql`SELECT 1`);
return NextResponse.json({ status: "healthy" }, { status: 200 });
} catch {