Reputation: 985
I want to use meteor publish composite two perform some join operations. I have two meteor application connected using ddp service. In which on first server i have given my code for publish composite. But how to call it from the server2.
My server1 code.
Meteor.publishComposite('board', function (userid) {
console.log('here')
return {
find: function () {
console.log(23456)
return Meteor.users.find(userid);
},
children: [{
find: function (user) {
return Apartment.find(user.lineup);
}]
}
});
Where to call Meteor.subscribe('boards');
?
How can i use it from the other application which i connected using ddp service. Thanks in advance.
Upvotes: 0
Views: 64
Reputation:
Here is how:
var otherServer = DDP.connect(url);
otherServer.subscribe(); // subscribe to collections
otherServer.call(); // call meteor methods
full list of methods at: http://docs.meteor.com/#/full/ddp_connect
Upvotes: 1