0.0.6 • Published 7 years ago
a9-db v0.0.6
a9-db
About
Storage plugin for node.js. All the data will be stored in folders & files in a folder called .a9db
in the root in a JSON format.
Installation
npm install a9-db
Example
var users = require('a9-db').init('users');
users.set('user7', {data_object:'data'});
users.get('user7', function(obj,err){
console.log(obj);
});
Usage
var db = require('a9-db').init('users');
//will return the database object
db.set(key, value);
//will set value for a key in the database in the db variable
db.get(key, callback);
//will read the value from the key and will be returned in the first parameter of the callback function, (data variable in the example)