|
|
|
@ -74,7 +74,8 @@ var Datastore = require('nedb') |
|
|
|
|
// Type 4: Persistent datastore for a Node Webkit app called 'nwtest' |
|
|
|
|
// For example on Linux, the datafile will be ~/.config/nwtest/nedb-data/something.db |
|
|
|
|
var Datastore = require('nedb') |
|
|
|
|
, db = new Datastore({ filename: 'something.db', nodeWebkitAppName: 'nwtest' }); |
|
|
|
|
, path = require('path') |
|
|
|
|
, db = new Datastore({ filename: path.join(require('nw.gui').App.dataPath, '/something.db') }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Of course you can create multiple datastores if you need several |
|
|
|
|