Files: 8f4b43a09aab9801bf28987edd59c2e366180327 / test / test-79-npm / nedb / nedb.js
351 bytesRaw
1 | ; |
2 | |
3 | var Nedb = require('nedb'); |
4 | var fs = require('fs'); |
5 | var filename = 'database.db'; |
6 | var db = new Nedb({ filename: filename }); |
7 | |
8 | db.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