diff --git a/dist/src/instance.js b/dist/src/instance.js index 0ee2bf9..073e14b 100644 --- a/dist/src/instance.js +++ b/dist/src/instance.js @@ -33,6 +33,7 @@ const createInstance = ({ app, server, options }) => { config: customConfig }); app.set('peerWs', wss); + app.emit('peerWs', wss); wss.on("connection", (client) => { const messageQueue = realm.getMessageQueueById(client.getId()); if (messageQueue) { diff --git a/src/instance.ts b/src/instance.ts index 4789205..42a1006 100644 --- a/src/instance.ts +++ b/src/instance.ts @@ -46,6 +46,7 @@ export const createInstance = ({ app, server, options }: { }); app.set('peerWs', wss); + app.emit('peerWs', wss); wss.on("connection", (client: IClient) => { const messageQueue = realm.getMessageQueueById(client.getId());