@erebos/rpc-node
RPC for node
Last updated a year ago by paul_lecam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @erebos/rpc-node 
SYNC missed versions from official npm registry.

rpc-node

rpc-request or rpc-stream factory with automatic transport selection.

Installation

yarn add @erebos/rpc-node

Usage

import nodeRPC from '@erebos/rpc-node'

const rpcOverHTTP = nodeRPC('http://localhost') // RequestRPC using HTTP transport
const rpcOverWS = nodeRPC('ws://localhost') // StreamRPC using WebSocket transport
const rpcOverIPC = nodeRPC('/path/to/socket') // StreamRPC using ICP transport

API

nodeRPC()

Arguments

  1. endpoint: string: socket path, HTTP or WebSocket URL to connect to.

Returns RequestRPC (with HTTP endpoint) or StreamRPC (with IPC or WebSocket endpoint).

License

MIT

Current Tags

  • 0.11.0                                ...           latest (a year ago)

2 Versions

  • 0.11.0                                ...           a year ago
  • 0.10.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |