Mongoskin

mongoskin

The future layer above node-mongodb-native.

mongoskin -> The promise wrapper for node-mongodb-native, makes life easier by helping us to work easily with mongodb, but how?

Check this out!

Install it like any other module: $ npm install mongoskin

With mongoskin you can dburl like mongodb://localhost:27017/test or use Replset :

1
2
3
4
5
var replSet = new ReplSetServers([
        new Server('localhost', 30000),
        new Server('localhost', 30001),
        new Server('localhost', 30002),
]);

Where Server is require('mongoskin').Server

Example usage of data insertion:

1
2
3
4
5
6
7
8
9
10
var mongo = require('mongoskin');

db = mongo.db('mongodb://localhost/test');

db.collection('test').insert({foo: 'bar'}, function(err, result) {
    console.log(result);
    db.collection('test').drop();
    db.close();

});

It has an extensive API with sleeker syntax compared with native.

Thanks to kissjs team, specially to Gui Lin

Suggest a module

Comments