import type { Knex } from "knex"; import path from "path"; import { fileURLToPath } from "url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const config: { [key: string]: Knex.Config } = { local: { client: "better-sqlite3", connection: { filename: process.env.SQLITE_DB_PATH || "./local.sqlite3", }, useNullAsDefault: true, migrations: { directory: path.join(__dirname, "migrations"), extension: "js", loadExtensions: [".js"], }, }, }; export default config;