fix: use process.cwd() for database path to fix production crash
This commit is contained in:
@@ -6,7 +6,7 @@ class DatabaseWrapper {
|
||||
private dbPath: string;
|
||||
|
||||
constructor() {
|
||||
this.dbPath = process.env.DB_PATH || path.join(__dirname, '../data/database.sqlite');
|
||||
this.dbPath = process.env.DB_PATH || path.join(process.cwd(), 'data/database.sqlite');
|
||||
this.db = new Database(this.dbPath, { verbose: console.log });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user