Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / 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