@sz-md/node-rcp
v0.2.0
Published
Remote call procedure (RPC) module:
Downloads
27
Readme
@sz-md/node-rcp
Remote call procedure (RPC) module:
Server
const {NodeRPCServer} = require("@sz-md/node-rpc")
const s = await NodeRPCServer.create({
path: "/path/to/functions",
server: /* any @sz-md/*-server instance */
})
Client
const {NodeRPCClient} = require("@sz-md/node-rpc")
const c = await NodeRPCClient.create({
client: /* any @sz-md/*-client instance */
})
// call "someFunction" on remote server
console.log(await c.remote.someFunction())