We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
首先让我们从 Hello World 开始。
var hprose = require("hprose"); function hello(name) { return "Hello " + name + "!"; } var server = hprose.Server.create("http://0.0.0.0:8080"); server.addFunction(hello); server.start();
启动服务器:
node server.js
var hprose = require("hprose"); var client = hprose.Client.create("http://127.0.0.1:8080/", ['hello']); client.hello("world", function(result) { console.log(result); });
启动客户端:
node client.js