Kano001 commited on
Commit
3903c9a
1 Parent(s): 2be0f98

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +2 -0
server.js CHANGED
@@ -1,6 +1,7 @@
1
  const colyseus = require("colyseus");
2
  const http = require("http");
3
  const express = require("express"); // optional
 
4
 
5
  // Initialize the Express app (optional)
6
  const app = express();
@@ -40,6 +41,7 @@ gameServer.define("my_room", MyRoom);
40
 
41
  // Serve static files (optional)
42
  app.use(express.static("public"));
 
43
 
44
  // Start the server
45
  const port = process.env.PORT || 7860;
 
1
  const colyseus = require("colyseus");
2
  const http = require("http");
3
  const express = require("express"); // optional
4
+ const monitor = require("@colyseus/monitor").monitor;
5
 
6
  // Initialize the Express app (optional)
7
  const app = express();
 
41
 
42
  // Serve static files (optional)
43
  app.use(express.static("public"));
44
+ app.use("/colyseus", monitor());
45
 
46
  // Start the server
47
  const port = process.env.PORT || 7860;