0.0.7 • Published 9 years ago

adaptor-crudbrella-mongoose v0.0.7

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

#adaptor-crudbrella-mongoose A mongoose adaptor for Crudbrella ###What exactly does it do? Allows crudbrella to work with mongoose

##Installation After installing nodeJS, your database of choice and crudbrella, install this adaptor via npm

npm install adaptor-crudbrella-mongoose

##Options ###Populate To populate a field with data stored in another collection, pass the field name to the populate option during the query.

//crudbrella
var crudbrella = require('crudbrella');
    //A database connection
    mongooseCollection = ...,
    //A crudbrella adaptor
    crudbrellaAdaptor = require("adaptor-crudbrella-mongoose"),
    //express app or router
    app;
    
    //open a crudbrella!
    myCrud = crudbrella({
	    type: crudbrellaAdaptor,
	    collection: mongooseCollection
    });
    
    //Query the movies collection and populate the actors from the actors collection
    app.get('/', myCrud.read({
        populate: 'actors'
    }));
0.0.7

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago