-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathREADME
30 lines (19 loc) · 800 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
This is a JSON-RPC server and client library for node.js <http://nodejs.org/>,
the V8 based evented IO framework.
Firing up an efficient JSON-RPC server becomes extremely simple:
var rpc = require('jsonrpc');
function add(first, second) {
return first + second;
}
rpc.expose('add', add);
rpc.listen(8000, 'localhost');
And creating a client to speak to that server is easy too:
var rpc = require('jsonrpc');
var sys = require('sys');
var client = rpc.getClient(8000, 'localhost');
client.call('add', [1, 2], function(result) {
sys.puts('1 + 2 = ' + result);
});
To learn more, see the examples directory, peruse test/jsonrpc-test.js, or
simply "Use The Source, Luke".
More documentation and development is on its way.