added commentary

This commit is contained in:
2026-02-07 20:38:56 -06:00
parent 07b3f0d741
commit 13e917183f
4 changed files with 131 additions and 20 deletions

View File

@@ -5,6 +5,7 @@ import http from "http";
import { matchRouter } from "./routes/matches.route.js";
import { attachWebsocketServer } from "./ws/server.js";
import { securityMiddleware } from "./utils/arkjet.js";
import { comRouter } from "./routes/commentary.route.js";
const PORT = process.env.PORT || 8081;
const HOST = process.env.HOST || "0.0.0.0";
@@ -23,9 +24,9 @@ app.get("/", (_, res) => {
app.use(securityMiddleware());
app.use("/matches", matchRouter);
app.use("/matches/:id/commentary", comRouter);
const { broadcastMatchCreated } = attachWebsocketServer(server);
app.locals.broadcastMatchCreated = broadcastMatchCreated;
server.listen(PORT, HOST, () => {