Added 1B, 2 and added bootstrap again for site

This commit is contained in:
2026-05-03 22:04:45 +02:00
parent b8995b3a1b
commit d1ce485572
37 changed files with 1842 additions and 89 deletions
+19
View File
@@ -0,0 +1,19 @@
const fs = require("node:fs");
const path = require("node:path");
const dataDir = path.resolve("data");
const source = path.join(dataDir, "leistungsbilanz.db");
if (!fs.existsSync(source)) {
console.error(`Database file not found: ${source}`);
process.exit(1);
}
const backupDir = path.join(dataDir, "backups");
fs.mkdirSync(backupDir, { recursive: true });
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
const target = path.join(backupDir, `leistungsbilanz-${timestamp}.db`);
fs.copyFileSync(source, target);
console.log(`Backup created: ${target}`);