https://github.com/colyseus/colyseus-monitor
Web Monitoring Panel for Colyseus
https://github.com/colyseus/colyseus-monitor
colyseus express monitoring
Last synced: about 1 month ago
JSON representation
Web Monitoring Panel for Colyseus
- Host: GitHub
- URL: https://github.com/colyseus/colyseus-monitor
- Owner: colyseus
- Created: 2018-01-27T13:56:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T03:23:50.000Z (6 months ago)
- Last Synced: 2025-06-06T17:30:19.633Z (4 months ago)
- Topics: colyseus, express, monitoring
- Language: TypeScript
- Homepage: http://colyseus.io
- Size: 1.58 MB
- Stars: 39
- Watchers: 8
- Forks: 19
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @colyseus/monitor
Web Monitoring Panel for [Colyseus](https://github.com/colyseus/colyseus)
You can use an express middleware to enable authentication on the monitor route, such as `express-basic-middleware`:
```typescript
import * as basicAuth from "express-basic-auth";const basicAuthMiddleware = basicAuth({
// list of users and passwords
users: {
"admin": "admin",
},
// sends WWW-Authenticate header, which will prompt the user to fill
// credentials in
challenge: true
});app.use("/colyseus", basicAuthMiddleware, monitor());
```## Setting custom room listing columns
```typescript
app.use("/colyseus", basicAuthMiddleware, monitor({
columns: [
'roomId',
'name',
'clients',
{ metadata: "spectators" }, // display 'spectators' from metadata
'locked',
'elapsedTime'
]
}));
```If unspecified, the default room listing columns are: `['roomId', 'name', 'clients', 'maxClients', 'locked', 'elapsedTime']`.
## Development
Install the dependencies and start the dev-server:
```
npm install
npm start
```Access the UI on [http://localhost:2567/colyseus](http://localhost:2567/colyseus).
## Environment Variables
* (optional) `GAME_SERVER_URL`: the URL for colyseus monitor to monitor (example: `server.game.com`), default to current URL (`${window.location.protocol}//${window.location.host}${window.location.pathname}`)
## License
MIT