Refactor 4 with bugfixes

This commit is contained in:
2026-03-04 03:56:23 +01:00
parent be91b6dfe8
commit 0ed9ca93d3
51 changed files with 1552 additions and 996 deletions

View File

@@ -0,0 +1,22 @@
import { Router } from 'express';
import { getAllPublicServers } from '../cqrs';
import { connectedUsers } from '../websocket/state';
const router = Router();
router.get('/health', async (_req, res) => {
const servers = await getAllPublicServers();
res.json({
status: 'ok',
timestamp: Date.now(),
serverCount: servers.length,
connectedUsers: connectedUsers.size
});
});
router.get('/time', (_req, res) => {
res.json({ now: Date.now() });
});
export default router;