Implementierung von Lebenszyklusprotokollierung und Serverstartstatistiken
All checks were successful
Deploy SingleChat / deploy (push) Successful in 48s

This commit is contained in:
Torsten Schulz (local)
2026-08-27 15:56:24 +02:00
parent 1f1c788204
commit 8e083436d9
3 changed files with 126 additions and 44 deletions

View File

@@ -9,12 +9,14 @@ import { dirname, join } from 'path';
import { setupBroadcast } from './broadcast.js';
import { setupRoutes } from './routes.js';
import { setupSEORoutes } from './routes-seo.js';
import { installLifecycleHandlers, logServerStart } from './server-lifecycle.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const app = express();
const server = createServer(app);
installLifecycleHandlers(__dirname, server);
// Umgebungsvariablen
const NODE_ENV = process.env.NODE_ENV || 'development';
@@ -233,6 +235,7 @@ if (IS_PRODUCTION) {
const HOST = process.env.HOST || '127.0.0.1';
server.listen(PORT, HOST, () => {
logServerStart(__dirname);
console.log(`Server läuft auf http://${HOST}:${PORT}`);
console.log(`Umgebung: ${NODE_ENV}`);
console.log(`CORS erlaubt für: ${allowedOrigins.join(', ')}`);