16 lines
544 B
TypeScript
16 lines
544 B
TypeScript
import express from "express";
|
|
import type { Router } from "express";
|
|
import { healthRouter } from "./healthRouter.js";
|
|
import { createGameRouter } from "./gameRouter.js";
|
|
import { lobbyRouter } from "./lobbyRouter.js";
|
|
import type { GameSessionStore } from "../gameSessionStore/index.js";
|
|
|
|
export const createApiRouter = (store: GameSessionStore): Router => {
|
|
const router = express.Router();
|
|
|
|
router.use("/health", healthRouter);
|
|
router.use("/game", createGameRouter(store));
|
|
router.use("/lobbies", lobbyRouter);
|
|
|
|
return router;
|
|
};
|