本项目仅演示 dubbo.ts 架构。
$ git clone [email protected]:cevio/dubbo.ts-example.git
$ cd dubbo.ts-example
$ npm i$ npm run server
$ npm run client注意: 分别分两个命令行窗口运行。
在浏览器中浏览地址 http://localhost:8000/?a=1&b=2 能看到以下输出:
a + b = 3
- 请先开启zookeeper,否则无效果报错。
- 请修改
src/registry.ts中host地址为你的 zookeeper 地址,如果有端口,那么修改为127.0.0.1:8888。
$ npm run server:registry
$ npm run client:registry注意: 分别分两个命令行窗口运行。
在浏览器中浏览地址 http://localhost:8000/?a=1&b=2 能看到以下输出:
a + b = 3
如果喜欢,请大家不要吝啬给一个star。此架构的性能非常高,具体性能请看主项目。
