feat(logging): implement centralized logging system and replace console errors with structured logs
feat(federation): add room sync and deletion notification endpoints for federated instances fix(federation): handle room deletion and update settings during sync process feat(federation): enhance FederatedRoomCard and FederatedRoomDetail components to display deleted rooms i18n: add translations for room deletion messages in English and German
This commit is contained in:
@@ -3,6 +3,7 @@ import express from 'express';
|
||||
import cors from 'cors';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { log } from './config/logger.js';
|
||||
import requestResponseLogger from './middleware/logging.js';
|
||||
import { initDatabase } from './config/database.js';
|
||||
import { initMailer } from './config/mailer.js';
|
||||
@@ -12,6 +13,7 @@ import recordingRoutes from './routes/recordings.js';
|
||||
import adminRoutes from './routes/admin.js';
|
||||
import brandingRoutes from './routes/branding.js';
|
||||
import federationRoutes, { wellKnownHandler } from './routes/federation.js';
|
||||
import { startFederationSync } from './jobs/federationSync.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
@@ -62,11 +64,14 @@ async function start() {
|
||||
}
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`🔴 Redlight server running on http://localhost:${PORT}`);
|
||||
log.server.info(`Redlight server running on http://localhost:${PORT}`);
|
||||
});
|
||||
|
||||
// Start periodic federation sync job (checks remote room settings every 60s)
|
||||
startFederationSync();
|
||||
}
|
||||
|
||||
start().catch(err => {
|
||||
console.error('❌ Failed to start server:', err);
|
||||
log.server.error(`Failed to start server: ${err.message}`);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user