mongodb Driver for osmos-lite.
This Driver is the split out version from the 1.x version of Osmos.
This package will work for osmos-lite. (As currently osmos-lite is in beta, you will have to install directly from github)
npm install mongodb --save
npm install git://github.com/limianwang/osmos-lite#master --save
npm install osmos-contrib-mongodb --save
var osmos = require('osmos-lite');
var OsmosMongoDriver = require('osmos-contrib-mongodb');
var mongodb = require('mongodb');
mongodb.MongoClient.connect(url, options, function(err, db) {
if(err) {
return done(err);
}
var driver = new OsmosMongoDriver(db);
osmos.drivers.register('mongodb', driver);
model = new Model('TestMongo', schema, 'name', 'mongodb');
model.create(...)
});