mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 21:54:09 +00:00
fix: db path
This commit is contained in:
+1
-2
@@ -4,7 +4,6 @@ import { config } from './config/config.js';
|
||||
// init database
|
||||
import { Low, JSONFile } from 'lowdb';
|
||||
|
||||
import { join } from 'path';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@@ -12,7 +11,7 @@ const __dirname = path.dirname(__filename);
|
||||
|
||||
const env = process.env.NODE_ENV || 'prod';
|
||||
|
||||
const file = join(__dirname, 'data/', config.database.filename);
|
||||
const file = path.join(__dirname, 'data/', config.database.filename);
|
||||
const adapter = new JSONFile(file);
|
||||
export const db = new Low(adapter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user