hoodie-store-server
CouchDB API for data persistence and offline sync
hoodie-store-server
is a Hapi plugin that implements
CouchDB’s Document API
and exposes a JavaScript API to manage databases, access and replications.
Example
var Hapi = var hoodieStore = var PouchDB = var server = server server serverstart { console}
Options
options.PouchDB
PouchDB constructor. Required
options: PouchDB:
If you want connect to a CouchDB, use the pouchdb-adapter-http
and set
options.prefix
to the CouchDB url. All requests will be proxied to CouchDB
directly, the PouchDB constructor is only used for server.plugins.store.api
options: PouchDB:
options.hooks
Route lifecycle hooks. Optional
options: hooks: onPreResponse: onPreResponseHandler onPreAuth: onPreAuthHandler onPostAuth: onPostAuthHandler onPreHandler: onPreHandlerHandler onPostHandler: onPostHandlerHandler onPreResponse: onPreResponseHandler
See http://hapijs.com/api#request-lifecycle for more information
Testing
Local setup
git clone https://github.com/hoodiehq/hoodie-store-server.git
cd hoodie-store-server
npm install
Run all tests and code style checks
npm test
Contributing
Have a look at the Hoodie project's contribution guidelines. If you want to hang out you can join our Hoodie Community Chat.