Simple flat file database of json object.
npm install jsonfiles
jsonfiles has revision checks like CouchDB and holds it's _id and _rev attributes the same way CouchDB does. jsonfiles is only slightly durable, it is not designed to be used in an environment with write concurrency.
jsonfiles can "clone" a CouchDB database. It cannot "replicate" as it does not have a by-sequence index or hold previous revision information.
Returns a new Database object for the given directory.
You can store other files in the same directory, all files that do not have a .json extension will be ignored.
Get the object with the specified id.
callback is a function that takes two arguments: error and obj.
Write an object to the database. If the object does not have an _id property a random uuid will be generated for it.
If the document is current in the database the _rev attribute must match the one that is already in the database in order to update it.
callback is a function that takes two arguments: error and info. info contains the id and revision information for the write.
Clones a CouchDB database at the given url.
callback is a function that takes two arguments: error and info. info contains the id and revision information for every write.