From c87654ed7c913d50d24384206ba0cdc7275d5947 Mon Sep 17 00:00:00 2001 From: Cam Spry Date: Mon, 2 Mar 2026 01:30:02 -0500 Subject: [PATCH] Fixes room list, adds OpenGraph so link previews look good --- public/menu.html | 2 ++ server.js | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/public/menu.html b/public/menu.html index 339f82b..8165058 100644 --- a/public/menu.html +++ b/public/menu.html @@ -3,6 +3,8 @@ + + Y.A.R.N. 2026 diff --git a/server.js b/server.js index e998788..3c28fc8 100644 --- a/server.js +++ b/server.js @@ -352,6 +352,14 @@ app.get('/', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'menu.html')); }); +app.get('/api/rooms', (req, res) => { + const roomList = Object.keys(games).map(name => ({ + name, + playerCount: games[name].players.length + })); + res.json({ rooms: roomList }); +}); + // Socket.IO connection handling io.on('connection', (socket) => { let currentRoom = null;