use given pouchdb instance to setup api