@mainframe/rpc-ws-node

WebSocket RPC for node

Usage no npm install needed!

<script type="module">
  import mainframeRpcWsNode from 'https://cdn.skypack.dev/@mainframe/rpc-ws-node';
</script>

README

rpc-ws-node

rpc-stream factory using transport-ws-node.

Installation

yarn add @mainframe/rpc-ws-node

Usage

import wsRPC from '@mainframe/rpc-ws-node'

const rpc = wsRPC('ws://localhost')

rpc.request('getUser', ['1234']).then(console.log)

API

wsRPC()

Arguments

  1. url: string

Returns StreamRPC

License

MIT