Awesome
Fortune NeDB Adapter
This is a NeDB adapter for Fortune.
Usage
Install the fortune-nedb
package from npm
:
$ npm install fortune-nedb
Then use it with Fortune:
const fortune = require('fortune')
const nedbAdapter = require('fortune-nedb')
const store = fortune({ ... }, {
adapter: [ nedbAdapter, {/* options */} ]
})
Options
All of the options are enumerated here. Here are additional adapter-specific options:
dbPath
: Path to a directory where the database is persisted to disk. Optional.
Note that the filename
option has no effect, since Fortune.js determines filenames based on type name.
In addition to the constructor options, there is also the query
function in the find
method, which accepts the query object as an argument, and may either mutate or return the query object. This allows for arbitrary queries.
License
This software is licensed under the MIT License.