link-node

1.0.12 • Public • Published

link-node

node语言实现的链接多端的胶水服务。

使用安装

npm install link-node

npm i link-node --registry=https://registry.npmmirror.com

例子

import LinkChannel from 'link-node';

callBack=(v)=> {
  console.log("call back::", v);
}

const channel = new LinkChannel(false);
channel.setHandle(this.callBack);
channel.Config.platform ="auto";
channel.Config.PC.port = 8888;
channel.Config.PC.host = "localhost";
channel.init();

setTimeout(() => {
   let r = { "jsonrpc": "2.0", "method": "say", "params": ["liam"], "id": 99, "service": "hello-world" };
   let result = channel.send(r.method, r.params, r.service);
   console.log(result);
}, 180);

Vue3使用例子

开发文档

Readme

Keywords

Package Sidebar

Install

npm i link-node

Weekly Downloads

1

Version

1.0.12

License

MIT

Unpacked Size

36.4 kB

Total Files

16

Last publish

Collaborators

  • meta-liam