fix: use process.cwd() for database path to fix production crash
This commit is contained in:
@@ -2,7 +2,7 @@ import Database from 'better-sqlite3';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import path from 'path';
|
||||
|
||||
const dbPath = path.join(__dirname, '../data/database.sqlite');
|
||||
const dbPath = path.join(process.cwd(), 'data/database.sqlite');
|
||||
const db = new Database(dbPath, { verbose: console.log });
|
||||
|
||||
const createTables = (): void => {
|
||||
|
||||
Reference in New Issue
Block a user