Nuclearly Potent Moonshine

    mongeese

    0.0.1 • Public • Published

    I wrote Mongeese because I couldn't figure out how to transparently access multiple MongoDB databases using Mongoose API.

    Install

    npm install mongeese
    

    Usage

    Replace code requiring mongoose module like this:

    var mongoose = require("mongoose");
    mongoose.connect(...);
    

    with:

    var mongoose = require("mongeese").create();
    mongoose.connect(...);
    

    Result of create method call should look and behave exactly like mongoose module except each result can have its own default connection.

    If you need to handle multiple databases at the same time, following should suffice:

    var logdb = require("mongeese").create();
    var keydb = require("mongeese").create();
    
    logdb.connect('mongodb://localhost/log');
    keydb.connect('mongodb://localhost/key');
    

    That's it.

    Keywords

    none

    Install

    npm i mongeese

    DownloadsWeekly Downloads

    79

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • donpark