jsondb
v1.0.0
Published
Simple database using json files.
Downloads
14
Readme
Simple database for storing JSON to disk.
Install
npm install jsondb
Usage
const createDB = require('jsondb');
const db = createDB('db', '.txt');
db.put('level1', {
name: "Level One", map: [
0, 0, 0, 0,
0, 1, 2, 0,
1, 1, 1, 1
],
attachment: "This goes in a different file",
}, (err) => {
if (err) throw err;
console.log("level1 saved.")
db.get('level1', (err, data) => {
if (err) throw err;
console.log('level 1 loaded', data);
});
});