diff --git a/src/node/server.js b/src/node/server.js index 39417e8..7b8fd87 100644 --- a/src/node/server.js +++ b/src/node/server.js @@ -97,6 +97,12 @@ function initApp({ } } + stateDoc.on('update', (update) => { + for (const ws of sockets) { + ws.send(update) + } + }) + return { app, broadcastState } }