Werk hoofdapplicatie bij
Legt de bestaande wijzigingen in de hoofdworktree vast voordat de laatste worktree wordt gemerged.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+5
-6
@@ -1,15 +1,14 @@
|
||||
const Database = require("better-sqlite3");
|
||||
const path = require("path");
|
||||
|
||||
const databaseFile = path.join(
|
||||
__dirname,
|
||||
"..",
|
||||
process.env.DATABASE || "database.sqlite"
|
||||
);
|
||||
const configuredDatabase = process.env.DATABASE || "database.sqlite";
|
||||
const databaseFile = path.isAbsolute(configuredDatabase)
|
||||
? configuredDatabase
|
||||
: path.join(__dirname, "..", configuredDatabase);
|
||||
|
||||
const db = new Database(databaseFile);
|
||||
|
||||
db.pragma("journal_mode = WAL");
|
||||
db.pragma("foreign_keys = ON");
|
||||
|
||||
module.exports = db;
|
||||
module.exports = db;
|
||||
|
||||
Reference in New Issue
Block a user