Express + Socket.IO + SQLite. Veto-Engine mit konfigurierbaren Map-Pools und validierten Abläufen, rollenbasierte Berechtigungen, Server-Lebenszyklus mit Demo-, Docker- und Static-Pool-Adapter (RCON), automatisches Herunterfahren. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
588 B
JavaScript
21 lines
588 B
JavaScript
import { loadConfig } from './config.js';
|
||
import { createApp } from './app.js';
|
||
|
||
const config = loadConfig();
|
||
const app = createApp(config);
|
||
const port = await app.start();
|
||
|
||
const label = app.adapter.simulated
|
||
? 'DEMO (simuliert – es werden keine echten CS2-Server gestartet)'
|
||
: app.adapter.name;
|
||
console.log(`CS2 Mapveto Backend läuft auf http://localhost:${port}`);
|
||
console.log(`Serveradapter: ${label}`);
|
||
|
||
for (const signal of ['SIGINT', 'SIGTERM']) {
|
||
process.on(signal, async () => {
|
||
console.log('Fahre herunter …');
|
||
await app.close();
|
||
process.exit(0);
|
||
});
|
||
}
|