TingoDB is embedded JavaScript NoSql database for Node.js and node-webkit. Its API and features designed to be upward compatible with MongoDB and its driver for Node.js. Consider this seriously. It is not just kind of MongoDB API only because it uses same query syntax. It is precise copy that allows to build applications that can transparently support both MongoDB and lightweight embedded data engine. It is even possible to adopt some derivative libraries that depends on MongoDB. Good example it Mongoose.js ODM library that can be connected with TingoDB using Tungus driver.

Current set of supported features includes search, indexes, atomic updates, grouping, map-reduce. All the above in pure JavaScript without binary dependencies with performance that will be comparable to native MongoDB, assuming of course, using it on reasonable sized data-sets.

Thinking about lightweight JavaScript database for your Node.js project TingoDB will be a risk and learn free solution. Learn free because there is no need to learn its API, it is plain MongoDB API. Risk free because switching to MongoDB is seamless and will not need code changes.

Take a look to modified usage example from MongoDB documentation and pay attention to differences that outlined by bold font.

 

var Engine = require('mongodb'),
    assert = require('assert');

var db = new Engine.Db('test', new Engine.Server('locahost', 27017));
var collection = db.collection("batch_document_insert_collection_safe");
collection.insert([{hello:'world_safe1'}
  , {hello:'world_safe2'}], {w:1}, function(err, result) {
  assert.equal(null, err);

  collection.findOne({hello:'world_safe2'}, function(err, item) {
    assert.equal(null, err);
    assert.equal('world_safe2', item.hello);
  })
});
var Engine = require('tingodb')(),
    assert = require('assert');

var db = new Engine.Db('/some/local/path', {});
var collection = db.collection("batch_document_insert_collection_safe");
collection.insert([{hello:'world_safe1'}
  , {hello:'world_safe2'}], {w:1}, function(err, result) {
  assert.equal(null, err);

  collection.findOne({hello:'world_safe2'}, function(err, item) {
    assert.equal(null, err);
    assert.equal('world_safe2', item.hello);
  })
});