meteor/mongodb: Use different DB for authentication & read/write -


meteor allows specify db using env variable mongo_url:

"mongodb://user:password@host:port/meteordb" 

meteor automatically use "meteordb" database authenticate against , collections refer database , read/write it.

however, use mongodb cloud manager setup users. saves users admin db rather having separate users saved in each database. use "admin" db authentication , "meteordb" data storage. possible?

yep, here's code snippet of how tie collection different mongodb url:

var db = new mongointernals.remotecollectiondriver("<one of dbs>"); mycollection = new mongo.collection("<your collection>", { _driver: db }); 

Comments