Update server.js
Browse files
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;
|