mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +02:00
use config file instead of env
This commit is contained in:
parent
6fb569e2cd
commit
d9ae322e2a
19 changed files with 189 additions and 209 deletions
|
@ -1,10 +1,10 @@
|
|||
import { drizzle } from "drizzle-orm/better-sqlite3";
|
||||
import Database from "better-sqlite3";
|
||||
import * as schema from "@server/db/schema";
|
||||
import environment from "@server/environment";
|
||||
import config, { APP_PATH } from "@server/config";
|
||||
import path from "path";
|
||||
|
||||
const location = path.join(environment.CONFIG_PATH, "db", "db.sqlite");
|
||||
const location = path.join(APP_PATH, "db", "db.sqlite");
|
||||
|
||||
const sqlite = new Database(location);
|
||||
export const db = drizzle(sqlite, { schema });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue