Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kaplanmaxe/async-mongo

Asynchronous wrapper for MongoDB
https://github.com/kaplanmaxe/async-mongo

Last synced: about 18 hours ago
JSON representation

Asynchronous wrapper for MongoDB

Awesome Lists containing this project

README

        

# async-mongo

Asynchronous wrapper for mongodb.

Note: this is package is WIP.

### Usage

```javascript
import Mongo from 'async-mongo';

Mongo.connect('mongodb://localhost:27017/test', {}, (err, database) => {
return db.find({ testing: true});
})
.then(res => {
return db.insert({ testing: true})
}, err => {
console.log('Docs not found');
})
.then(res => {
console.log('Docs inserted');
});
```