pouchdb-hoodie-sync
Hoodie-like sync API for PouchDB
This PouchDB plugin provides simple methods to keep two databases in sync.
Usage
// Initialisationvar db = 'dbname'var api = db // starts / stops continuous replicationapiapiapi // resolve with pulled docs[]apiapi // resolve with pushed docs[]apiapi // resolve with synced docs[]apiapi // eventsapiapiapiapi
If you need to customise the request to the server, e.g. set custom header for
authorisation, you can use PouchDB.defaults{ajax}
:
var MyPouch = PouchDB
In the browser
In node.js
var PouchDB = PouchDB
Testing
In Node.js
Run all tests and validates JavaScript Code Style using standard
npm test
To run only the tests
npm run test:node
Run tests from single file
node test/unit/connect-test.js
Contributing
Have a look at the Hoodie project's contribution guidelines. If you want to hang out you can join #hoodie-pouch on our Hoodie Community Slack.