FiloDB is a lightweight JSON file-based database built with Node.js. It’s ideal for small projects, prototyping, CLI tools, or educational purposes where a full database engine is not necessary.
npm install filodb
import FiloDB from 'filodb';
const db = new FiloDB('./myDB.json'); // Relative to the project root (where package.json is)
await db.insert({ name: 'Alice' }, { name: 'Bob' });
const result = await db.get({ name: 'Alice' });
console.log(result);
await db.update({ name: 'Alice' }, { name: 'Eve' });
await db.delete({ name: 'Bob' });
Keep in mind that every method, except for Zenith.prototype.get
returns the FiloDB
instance, allowing method chaining.
Creates a new instance. If the file doesn't exist, it will be automatically created.
Inserts one or more records.
Returns an array of records matching the query. Optionally limit the number of results.
Updates all records matching the query with the given data.
Deletes all records matching the query.
This project is licensed under the MIT License. See LICENSE for details.