resolve-subscribe-socket.io
v0.24.23
Published
An adapter resolve-redux uses to subscribe to events via Socket.io.
Downloads
37
Readme
resolve-subscribe-socket.io
This package is a resolve-redux
adapter used to subscribe to events via Socket.io.
Client Side
import createClientAdapter from 'resolve-subscribe-socket.io/create_client_adapter';
(async () => {
const adapter = createClientAdapter({ origin, rootPath, url, appId, onEvent })
await adapter.init()
})()
Server Side
import createServerAdapter from 'resolve-subscribe-socket.io/create_server_adapter';
(async () => {
const adapter = createServerAdapter({ server, getRootBasedUrl, pubsubManager, appId })
await adapter.init()
})()