continuable-mongo
v0.6.3
Published
A thin mongo wrapper which exposes mongodb as continuables
Downloads
10
Readme
continuable-mongo
A thin mongo wrapper which exposes mongodb as continuables
Example
var mongo = require("continuable-mongo")
var client = mongo("mongodb://localhost:27017/my_db")
var myCollection = client.collection("my-collection")
myCollection.insert([{
some: "key",
value: "pair"
}])(function (err, inserted) {
// inserted records
myCollection.findOne({
some: "key"
})(function (err, result) {
// result.value === "pair"
console.log("result", result)
})
})
Installation
npm install continuable-mongo
Contributors
- Raynos