I followed alternative-express-compatibility-layer to employ uWebSockets.js in my colyseus server. I wanted to enable the monitoring module by the following code snippet but failed:
const uwsTransport = new uWebSocketsTransport({});
const app = expressify(uwsTransport.app);
app.use(cors());
app.use(express.json());
const auth = basicAuth.default({
users: {
someuser: "somepassword",
},
challenge: true,
});
app.use(auth);
app.use("/colyseus", monitor());
const gameServer = new Server({
transport: new uWebSocketsTransport({
}),
});