Hi,
I was wondering whether anyone else needs to link a Meteor project to another Meteor Project’s User Collection.
I use three platforms, for this example I will call them App (Main app), BizApp and ChatApp. They all use the same user DB of App. I would like to avail of Meteor.users in all three apps where App requires reactivity and the others, BizApp and ChatApp do not need reactivity.
What I do now is to use a modified accounts-base package where
this.users = new Mongo.Collection("users", {
_preventAutopublish: true,
connection: this.connection
});
is replaced by
this.users = new Meteor.Collection('users', {
_preventAutopublish: true,
connection: this.connection,
_driver: new MongoInternals.RemoteCollectionDriver(process.env.MONGO_USERS_URL, {})
});
My question to you is how do you deal with this problem(if you have it, indeed)? Would you support the idea of having a Env variable such as ‘MONGO_USERS_URL’ that lets you connect into another Users Collection?