0.1.0 • Published 10 years ago

co-mongodb v0.1.0

Weekly downloads
17
License
-
Repository
github
Last release
10 years ago

co-mongodb

Build Status

Manipulation library to use the mongodb native driver with generator based flow control libraries such as co and frameworks such as koa.

Instalation

$ npm install co-mongodb

Example

var comongo = require('co-mongodb');

co(function *() {
  // db is just a regular Db instance from the native driver.
  db = yield comongo.client.connect('mongodb://localhost:27017/test');
  
  // The same goes for collection.
  var collection = yield comongo.db.collection(db, 'testCollection');
  
  var result = yield comongo.db.addUser(db, 'user', 'pass');
  var user = result[0];
  yield comongo.db.removeUser(db, 'user');
  
  yield comongo.db.close(db);
})();

Supported functions

More to come soon...

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago