edjafarov / mongo-pipe-api

PromisePipe mongo API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mongo-pipe-api mongojs Promise API compatible with PromisePipes

Mostly nodejs modules are not compatible with Promises.

With mongo-pipe-api you can write your code like

var PromisePipe = require('promise-pipe')();

PromisePipe.use('db', MongoPipeApi('test', ['Item']));

var putItemInDB = PromisePipe().db.insert.Item({item});

putItemInDB.then(function(){
  //item is in Item collection
})

About

PromisePipe mongo API

License:MIT License


Languages

Language:JavaScript 100.0%