From 3cfd73d5c5448f701fbce39ee094fa0e0d40cb12 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 28 Apr 2021 19:02:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=BA=9B=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.json | 5 +++++ src/index.ts | 2 -- src/rooms/PuzzleMathRoom.ts | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 config/config.json diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..c394e7e --- /dev/null +++ b/config/config.json @@ -0,0 +1,5 @@ +{ + "redis": "redis://127.0.0.1:6379/14", + "mongodb": "mongodb://127.0.0.1/pyxis-development", + "info_svr": "http://127.0.0.1:2987/svr" +} diff --git a/src/index.ts b/src/index.ts index b2ca991..99ed0b0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,6 @@ import { MongooseDriver } from 'colyseus/lib/matchmaker/drivers/MongooseDriver' import { RedisClient } from './redis/RedisClient' import { PuzzleMathRoom } from './rooms/PuzzleMathRoom' -require('./rooms/MSender') -require('./rooms/RoomExtMethod') require('./common/Extend') const isProd = process.env.NODE_ENV === 'production' diff --git a/src/rooms/PuzzleMathRoom.ts b/src/rooms/PuzzleMathRoom.ts index 3af9603..48eb9b2 100644 --- a/src/rooms/PuzzleMathRoom.ts +++ b/src/rooms/PuzzleMathRoom.ts @@ -32,4 +32,8 @@ export class PuzzleMathRoom extends Room { onDispose() { this.dispatcher.stop() } + + adminMsg(str: string) { + console.log(`receive admin msg: ${str}`); + } }