UNPKG

remjson

Version:

JSON-RPC 1.0/2.0 compliant server and client

12 lines (8 loc) 293 B
var remjson = require(__dirname + '/../../'); var client = remjson.client.http({ port: 3000, host: 'localhost' }); client.request('echo', ['Hello, world!'], function(err, reply) { console.log(reply); }); client.request('multiply', [5, 5], function(err, reply) { console.log(reply); });