Lobby urls! Server will server index.html and act as a SPA.

This commit is contained in:
NewHappyRabbit
2025-02-12 21:18:23 +02:00
parent e1a6c5f7bd
commit 303543d246
7 changed files with 74 additions and 28 deletions
+5
View File
@@ -130,6 +130,11 @@ app.get("/private_lobby/:id", (req, res) => {
});
});
app.get("*", function (req, res) {
// SPA routing
res.sendFile(path.join(__dirname, "../../out/index.html"));
});
wss.on("connection", (ws, req) => {
ws.on("message", (message: string) => {
try {