電子アプリからnedbに接続しようとしています。 CRUDの操作は素晴らしいです。しかし、私はdbファイル(D:/my.db、隠しファイルをチェックしていない)は表示されません。ファイルはマシンの再起動後もデータを保持するため、どこかに存在します。私は電子が自分の道を相対的なものとして脅かすと思うが、私はそれをどこでも見つけることができる。電子アプリのNEDB永続性
var Datastore = require('nedb'), db = new Datastore({filename : 'D:/my.db', autoload: true});
var doc = { hello: 'world'
, n: 5
, today: new Date()
, nedbIsAwesome: true
, notthere: null
, notToBeSaved: undefined // Will not be saved
, fruits: [ 'apple', 'orange', 'pear' ]
, infos: { name: 'nedb' }
};
db.insert(doc, function (err, newDoc) { // Callback is optional
// newDoc is the newly inserted document, including its _id
// newDoc has no key called notToBeSaved since its value was undefined
});