Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@colyseus/monitor

Package Overview
Dependencies
Maintainers
0
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colyseus/monitor

Web Monitoring Panel for Colyseus

  • 0.15.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@colyseus/monitor

Web Monitoring Panel for Colyseus

You can use an express middleware to enable authentication on the monitor route, such as express-basic-middleware:

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

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.

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

Keywords

FAQs

Package last updated on 16 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc