Hello,
I have splitted my app in to two separate “apps” which are not using the same database.
I need to update a collection on one of the remote servers (clients?).
//server 1
var birds = new Mongo.Collection('birds');
//server 2
var remote = DDP.connect('server1');
var birds = new Mongo.Collection('birds', remote); //connect to the remote database
var update = update.birds(birdId, {$inc: {timesPooped: 1}}); //throws error - 403 - Access denied
There are no Allow/Deny rules set up, 99% of client updates are made via methods.
I can see the problem, server 2
is a client to server 1
, but what is the easiest solution? Using new MongoInternals.RemoteCollectionDriver
is there something else I’m overlooking or this is the only solution to my problem. Since this is a “server” collection why it does not reuse the mongo collection which is being used on server 1
?
I’m guessing this approach (two separate DBs) is making my life harder, therefore I should move everything in to one DB.