dbfree-node
Just a simple key value store, local file system, json object
No muss no fuss
// Example plugin// A plugin extends the capability of dbfree var { return // runs when the db is started, return a value to set the in-memory object { console; } // the following run before and after each data change // the same params for get and set are passed in { console; } { console; } // plugins don't modify the data being saved { console; } { console; } } // Another plugin, to persist all data in a file. See /dbfree-node-plugins for plugins.// A different plugin could be made to put each table in a different file, save files as CSV, whatever.. var { options = options || {}; var fs = ; var path = 'path' in options ? optionspath : "."; if!fs fs; var dbfn = path + '/db.json'; return { // init file if not exists if!fs fs; // load data from file into memory return JSON } { // no need } { // no need } { // no need } { // dump entire object to disk fs; } } // Run a test - with both plugins var db = plugins: ;dblog = consolelog; // log stuff console; console; console; console; console; console;