git ssb

0+

cel-desktop / ssb-pkg



Tree: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44

Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / nedb / nedb.js

351 bytesRaw
1'use strict';
2
3var Nedb = require('nedb');
4var fs = require('fs');
5var filename = 'database.db';
6var db = new Nedb({ filename: filename });
7
8db.loadDatabase(function (error) {
9 if (error) throw error;
10 db.insert([ { a: 5 }, { a: 42 } ], function (error2) {
11 if (error2) throw error2;
12 fs.unlinkSync(filename);
13 console.log('ok');
14 });
15});
16

Built with git-ssb-web