mirror of https://github.com/bra1n/townsquare.git
update server response
This commit is contained in:
parent
2da21282cc
commit
3a5a8bfc9a
|
@ -144,10 +144,14 @@ if (process.env.NODE_ENV !== "development") {
|
||||||
server.on("request", (req, res) => {
|
server.on("request", (req, res) => {
|
||||||
res.writeHead(200);
|
res.writeHead(200);
|
||||||
res.end(
|
res.end(
|
||||||
JSON.stringify({
|
`# HELP players_concurrent Concurrent players
|
||||||
players: wss.clients.size,
|
# TYPE players_concurrent gauge
|
||||||
channels: Object.keys(channels).length
|
players_concurrent{app="clocktower-online"} ${wss.clients.size}
|
||||||
})
|
|
||||||
|
# HELP channels_concurrent Concurrent channels
|
||||||
|
# TYPE channels_concurrent gauge
|
||||||
|
channels_concurrent{app="clocktower-online"} ${Object.keys(channels).length}
|
||||||
|
`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue