feat(backend): automatisches taegliches SQLite-Online-Backup

This commit is contained in:
Kenearos 2026-07-07 15:50:34 +02:00
parent 45503f03ee
commit 97e58903b8
3 changed files with 56 additions and 1 deletions

View file

@ -1,6 +1,7 @@
const path = require('path');
const express = require('express');
const { getDoc, putDoc } = require('./db');
const { scheduleBackups } = require('./backup');
const app = express();
app.use(express.json({ limit: '5mb' }));
@ -36,7 +37,10 @@ app.use(express.static(path.join(__dirname, '..')));
if (require.main === module) {
const PORT = process.env.PORT || 3000;
app.listen(PORT, '0.0.0.0', () => console.log(`Dienstplan-Pro auf :${PORT}`));
app.listen(PORT, '0.0.0.0', () => {
console.log(`Dienstplan-Pro auf :${PORT}`);
scheduleBackups();
});
}
module.exports = app;