Files
minabot/scripts/start.ts
syntaxbullet 29bf75760b feat(db): add Drizzle ORM with local SQLite storage
Configure Bun SQLite with WAL mode, foreign keys, and a shared database path for development and production.

Add migration commands and startup migration handling, check database connectivity in the health endpoint, and document configuration while excluding local database files from Git.
2026-09-04 07:50:14 +02:00

10 lines
413 B
TypeScript

import { databasePath } from "../src/db/config";
import { fileURLToPath } from "node:url";
// Bun's built HTML assets resolve from dist; keep the database path absolute.
process.env.DATABASE_PATH = databasePath;
process.env.NODE_ENV = "production";
process.chdir(fileURLToPath(new URL("../dist", import.meta.url)));
const entrypoint = new URL("../dist/index.js", import.meta.url).href;
await import(entrypoint);