RPC client over WebSocket
Purpose
StreamRPC
factory using the WebSocket transport.
Installation
For browser
npm install @erebos/rpc-ws-browser
For Node
npm install @erebos/rpc-ws-node
Usage
import { createRPC } from '@erebos/rpc-ws-browser'
const rpc = createRPC('ws://localhost')
rpc.request('getUser', ['1234']).then(res => {
console.log(res)
})
API
createRPC()
Arguments
url: string
Returns StreamRPC