From 0b3c586b0f7572396d95f48864cd51a8ebe55628 Mon Sep 17 00:00:00 2001 From: Endel Dreyer Date: Sat, 23 Mar 2024 11:30:36 -0300 Subject: [PATCH] add playground --- Server/package.json | 1 + Server/src/app.config.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Server/package.json b/Server/package.json index 5f39d46e..b313b2dc 100644 --- a/Server/package.json +++ b/Server/package.json @@ -19,6 +19,7 @@ "homepage": "https://github.com/colyseus/create-colyseus#readme", "devDependencies": { "@colyseus/loadtest": "^0.15.0", + "@colyseus/playground": "^0.15.0", "@colyseus/testing": "^0.15.0", "@types/cors": "^2.8.6", "@types/express": "^4.17.1", diff --git a/Server/src/app.config.ts b/Server/src/app.config.ts index 6b759ebf..79085ad5 100644 --- a/Server/src/app.config.ts +++ b/Server/src/app.config.ts @@ -2,6 +2,7 @@ import config from "@colyseus/tools"; import { WebSocketTransport } from "@colyseus/ws-transport"; import { monitor } from "@colyseus/monitor"; +import { playground } from "@colyseus/playground"; // import { RedisDriver } from "@colyseus/redis-driver"; // import { RedisPresence } from "@colyseus/redis-presence"; @@ -13,8 +14,6 @@ import { MyRoom } from "./rooms/MyRoom"; import auth from "./config/auth"; export default config({ - getId: () => "Your Colyseus App", - options: { // devMode: true, // driver: new RedisDriver(), @@ -46,6 +45,9 @@ export default config({ */ app.use("/colyseus", monitor()); + // Bind "playground" + app.use("/playground", playground); + // Bind auth routes app.use(auth.prefix, auth.routes()); },