local-nosql-db is a lightweight, file-based NoSQL database designed exclusively for local development, educational purposes, and exploration. Version 1.1.7 is the current stable release, with an infrequent release cadence given its niche purpose. It stores data in JSON files, mimicking a simplified MongoDB-like API for basic CRUD operations (Create, Read, Update, Delete). Key differentiators include its extreme simplicity, zero external dependencies, and focus on providing a hands-on experience with NoSQL concepts without the overhead of a full database server. It is explicitly not recommended or suitable for production environments due to inherent limitations in scalability, concurrency handling, and data integrity guarantees. Its primary use case is isolated local data persistence for small projects or learning exercises.
npm install local-nosql-dbVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the local NoSQL database, create a collection, and perform basic CRUD operations (insert, find, update, delete) on documents. It also shows how to manage the persistence directory.
Do not deploy applications using local-nosql-db to production. Use mature, production-ready NoSQL databases like MongoDB, CouchDB, or a cloud-managed service.
Translate any French error messages or log outputs using a translation tool to understand the underlying issue.
Ensure proper shutdown procedures for your application. Avoid highly concurrent write operations. Regularly back up your data directory if critical, even for development purposes. Consider using a more robust embedded database if data integrity is paramount.
Filter results in application memory after fetching them from the database, or simplify your data model to fit the basic query capabilities. For complex data needs, migrate to a feature-rich NoSQL solution.
Accept that the library's feature set and maintenance schedule are minimal. For projects requiring active development and support, choose a different database solution.
Ensure you call `await db.init()` after creating a new `Database` instance and await its completion before any other database interactions.
Verify the `dbPath` string is a valid file system path and that your application has read/write permissions for that directory. Ensure the directory exists before initializing the database or handle its creation programmatically.
Inspect the specified JSON file for syntax errors. If the data is not critical, delete the file (losing data for that collection) or manually repair the JSON structure. Implement robust error handling around file I/O if possible, although the library might abstract this.
No dependency data recorded yet.