Skip to content

maxfi/meteor-remote-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

meteor-remote-collection

Use additional MongoDB databases in your Meteor app.

Installation

$ meteor add maxfi:remote-collection

Usage

On client or server:

// using a MongoDB URI
MyCollection = new RemoteCollection('mongodb://username:password@localhost:27017/database');

// or using an environment variable
MyCollection = new RemoteCollection('SOME_ENV_VAR'); // Where `process.env.SOME_ENV_VAR`

// optionally pass in connection options
var connectionOptions = {oplogUrl: 'mongodb://username:password@localhost:27017/local?authSource=admin'};
MyCollection = new RemoteCollection('SOME_ENV_VAR', connectionOptions);

// or optionally pass in OPLOG URI
MyCollection = new RemoteCollection('SOME_ENV_VAR', 'SOME_OTHER_ENV_VAR'); // Where `process.env.SOME_OTHER_ENV_VAR`

To Do

  • Potentially reuse MongoInternals.RemoteCollectionDriver across multiple RemoteCollection instances.

About

Use additional MongoDB databases in your Meteor app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published