add debug logging for websockets

This commit is contained in:
Mystikfluu
2022-09-21 16:08:59 +02:00
parent 887001acbd
commit 61b1534b8a
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -212,7 +212,9 @@ export const setup = function (router, con, server) {
data: post_obj
};
let messagestr = JSON.stringify(message);
console.log(5,server.wss.clients);
server.wss.clients.forEach(function(ws) {
console.log(5,ws);
ws.send(messagestr);
});
res.json({ "success": "successfully posted message" });