TingoDB is an embedded JavaScript database for Node.js, designed to be upwardly compatible with MongoDB's v1.4 API. It can operate either as an in-process filesystem database, storing data on disk, or entirely in memory. While the npm metadata shows version 0.6.1 and a README excerpt mentions an `apiLevel` parameter in 0.6.x for some 2.x specific behaviors, the project appears to be largely abandoned, with the last update noted in 2015/2018 and the author explicitly stating its abandonment in 2019. Its key differentiator was offering a local, file-based or in-memory data store with a familiar MongoDB-like query interface, rigorously tested using portions of the official MongoDB Node.js driver's test suite, allowing it to potentially serve as a drop-in replacement for applications built against older MongoDB driver versions.
npm install tingodbVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing TingoDB to a local file path, creating a collection, inserting multiple documents, and querying for them, mirroring MongoDB's v1.4 API behavior.
Explicitly set `apiLevel` in the factory function call, e.g., `require('tingodb')({ apiLevel: 140 })` to ensure consistent behavior with MongoDB 1.4.x, or `apiLevel: 200` for 2.x behaviors.Ensure your application only uses MongoDB features and API calls available in MongoDB version 1.4.x. If newer features are required, a full MongoDB instance is necessary.
Always call the required module as a function: `const TingoDBModule = require('tingodb')();` before accessing `TingoDBModule.Db`.TingoDB is suitable for lightweight, local data persistence. For networked, scalable, or production-grade database solutions, a full MongoDB deployment is required.
The `tingodb` module exports a function that must be called to return the object containing the `Db` constructor. Use `const Db = require('tingodb')().Db;`Consult MongoDB 1.4.x documentation to ensure all queries and operations are compatible with that specific API level. Rewrite queries to use supported operators.
Ensure the directory specified in `new Db('/some/local/path', {})` exists and is writable by the Node.js process, or handle directory creation before initializing the database.No dependency data recorded yet.