UNPKG

remjson

Version:

JSON-RPC 1.0/2.0 compliant server and client

12 lines (9 loc) 273 B
var remjson = require(__dirname + '/../..'); var client = remjson.client.http({ hostname: 'localhost', port: 3000 // the port of the public server }); client.request('add', [5, 9], function(err, error, result) { if(err) throw err; console.log(result); // 14! });