octo-db
octo-db
is a simple flat file JSON DB to be used for prototyping and testing. Super easy to setup and use.
Setup
const db = ;db;
Insert
const db = ;const result = await db;console;
Query
const db = ;const query = await db;console;
Remove
const db = ;const remove = await db;console;
Flush DB
This removes all records from the DB
const db = ;await db;
Update
Update takes two args. First the matching object then the keys/value to update. Eg: This updates all records which have an email of sarah.smith@test.com
to sarah.jones@gmail.com
and returns the result.
const db = ;const update = await db;console;