avs-proxy
Version:
Proxy for avs-rpc
33 lines (25 loc) • 659 B
JavaScript
// Generated by CoffeeScript 1.8.0
(function() {
var Client, Test;
Client = require('avs-proxy').Client;
new Client("http://localhost:" + process.argv[2] + "/ns", function(rpc, err) {
var remotec;
if (err) {
return console.log(err);
} else {
console.log("cli connected!");
rpc.implement(new Test);
remotec = rpc.remote('getAge');
return remotec.getAge(function(rst, err) {
return console.log(err ? err : "getAge: " + rst);
});
}
});
Test = (function() {
function Test() {}
Test.prototype.echo = function() {
return "ok";
};
return Test;
})();
}).call(this);