A Javascript module for Node.js to connect Dubbo service by node-zookeeper-client.
You can install it using npm:
$ npm install zoodubbo
var ZD = require('zoodubbo');
var zd = new ZD({
conn: 'localhost:2181',
dobbo: '2.5.3'
});
zd.connect();
zd.client.on('connected', function connect() {
console.log('zookeeper client connected!');
});
var service = zd.getService('com.demo.Service');
var method = 'getUserByID';
var arg1={$class:'int',$:123};
service.excute(method, [arg1], function (err, data) {
console.log('excute');
if (err) {
console.log(err);
return;
}
console.log(data)
});