import * as express from "express"; import { GameServer } from "./GameServer"; import { CreateLabyrinthMiddleware } from "./LabyrinthMiddleware"; import { createSampleMaps } from "./SampleMaps"; const port = 8080; const apiRoot = "/graphql"; const app = express(); const games = new GameServer(); const maps = createSampleMaps(); maps.forEach(m => games.addMap(m)); app.use(apiRoot, CreateLabyrinthMiddleware(true, games)); app.listen(port, () => console.log(`App listening on port ${port}...`));