mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-04 01:55:10 +02:00
add extra validation to environment.ts and use os paths
This commit is contained in:
parent
497b8a223f
commit
9c40d8a5c7
5 changed files with 41 additions and 15 deletions
|
@ -2,8 +2,11 @@ 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 path from "path";
|
||||
|
||||
const sqlite = new Database(`${environment.CONFIG_PATH}/db/db.sqlite`);
|
||||
const sqlite = new Database(
|
||||
path.join(environment.CONFIG_PATH, "db", "db.sqlite"),
|
||||
);
|
||||
export const db = drizzle(sqlite, { schema });
|
||||
|
||||
export default db;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue