Merge branch 'main' of https://github.com/H4CK3R-01/Projektmanagement-Game into main
This commit is contained in:
commit
88300c1be2
@ -13,15 +13,21 @@ server.listen(port, function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Monitor websockets
|
// Monitor websockets
|
||||||
instrument(io, {
|
if (process.env.WEBSOCKET_MONITOR_USERNAME && process.env.WEBSOCKET_MONITOR_PASSWORD) {
|
||||||
auth: {
|
instrument(io, {
|
||||||
type: "basic",
|
auth: {
|
||||||
username: process.env.WEBSOCKET_MONITOR_USERNAME,
|
type: "basic",
|
||||||
password: process.env.WEBSOCKET_MONITOR_PASSWORD
|
username: process.env.WEBSOCKET_MONITOR_USERNAME,
|
||||||
},
|
password: process.env.WEBSOCKET_MONITOR_PASSWORD
|
||||||
serverId: `${require("os").hostname()}#${process.pid}`
|
},
|
||||||
});
|
serverId: `${require("os").hostname()}#${process.pid}`
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
instrument(io, {
|
||||||
|
auth: false,
|
||||||
|
serverId: `${require("os").hostname()}#${process.pid}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Serve static files (html, css, js)
|
// Serve static files (html, css, js)
|
||||||
app.use(express.static(__dirname + '/../public'));
|
app.use(express.static(__dirname + '/../public'));
|
||||||
|
Loading…
Reference in New Issue
Block a user