Why not split your meteorite into 2 instances, one for your client and one for your administration interface. Personally, I would use roles, but there is nothing wrong if you prefer:
Your meteor administrator admin js code
OtherMeteor = Meteor.connect("http://other_meteor_url")
OtherMeteor.call("getuser",{username:admin}, function(err,result) {
console.log("result")
})
OR you can directly connect to the collection on another instance of the meteor
remote_meteor = Meteor.connect("http://other_meteor_url");
users2 = new Meteor.Collection("users", {manager: remote_meteor})
//wait for the subscription to finish first then use:
console.log(users2.find().fetch())
users2.up
Code in another meteor that performs custom functions:
Js server:
Meteor.methods({
'getuser':function(query) {
return Meteor.users.find(query).fetch();
},
'updateuser':function(query,modifier) {
return Meteor.users.update(query,modifier);
}
})
source
share