loopback-component-realtime icon indicating copy to clipboard operation
loopback-component-realtime copied to clipboard

Fireloop socket.on event handle

Open aokudan opened this issue 7 years ago • 0 comments

Hello all,

I want to use FireLoop with Loopback. But I don't understand, how can I define event name for user subscribe in index.html. I found sample project the following. Can it be done with FireLoop?

https://github.com/mean-expert-official/loopback-component-realtime/blob/master/tests/client/index.html

client.on('[POST]/api/rooms', function (room) {
        console.info('Room ', room);
      });
      // subscribe for new messages in the room with Id 1
      client.on('[POST]/api/rooms/1/messages', function (message) {
        console.info('Message ', message);
      });

aokudan avatar Oct 11 '18 21:10 aokudan