Refactor database configuration and enhance server settings: Update database connection logic to utilize environment variables and improve error handling in database connection. Adjust server port configuration to prioritize BACKEND_PORT. Update HTML structure for better compatibility and add missing elements in various components.

This commit is contained in:
Torsten Schulz (local)
2026-04-08 08:37:36 +02:00
parent 7d54156112
commit 6ffc1fedd9
87 changed files with 870 additions and 233 deletions

View File

@@ -27,7 +27,7 @@ const filesRouter = require('./routes/files');
const liturgicalDaysRouter = require('./routes/liturgicalDays');
const app = express();
const PORT = parseInt(process.env.PORT, 10) || 3000;
const PORT = parseInt(process.env.BACKEND_PORT || process.env.PORT, 10) || 3000;
// CORS mit Whitelist und tolerantem Fallback für fehlende Origin-Header
const allowedOrigins = (process.env.ALLOWED_ORIGINS || '')