added commentary
This commit is contained in:
@@ -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, () => {
|
||||
|
||||
Reference in New Issue
Block a user