quick-store
v0.1.4
Published
quick-store =========== Quick JSON storage for NodeJS server, using localStorage syntax with a few added. Async. ```` var db = require('quick-store')(); // saved file ./db.json var db = require('quick-store')('./mydb.json'); // saved file ./mydb.json
Downloads
38
Readme
#####Simple local file JSON storage
Saves to settings.json by default. Single function getset(k, v). Asynchronous.
var simpledb = require('./quick.js')();
// Set value - saves to JSON file
simpledb.getset('key', 'value', function(o){
console.log(o);
});
// Get value
simpledb.getset('key', function(s){
console.log(s); // 'value'
});
Alternate file name..
var simpledb = require('./quick.js')('./mydb.json');