Open nueko opened 7 years ago
@nueko defaultDB needs to be a instance of PouchDB ...
Pouch.plugin(PouchFind)
Pouch.plugin(PouchLiveFind)
Pouch.plugin(PouchAuthentication)
Vue.use(VuePouch, {
pouch: Pouch,
defaultDB: new Pouch('http://localhost:5984/boom')
})
Documentation incorrectly shows:
Vue.use(require('vue-pouch'), {
pouch: PouchDB, // optional if PouchDB
is available on the global object
defaultDB: // the database to use if none is specified in the pouch setting of the vue component
})
But what about when the documentation shows:
When using VuePouch, don't use new PouchDB(...)
Just following the todo example I am getting the following error:
Nuxt.js Error:
Error: Invalid Adapter: undefined at new PouchDB$3 (C:\project\code\nodejs\dbserver\node_modules\pouchdb-browser\lib\index.js:2774:11) at VueComponent.vm.$watch.immediate (C:\project\code\nodejs\dbserver\node_modules\vue-pouch\index.js:192:42) at VueComponent.Vue.$watch (C:\project\code\nodejs\dbserver\node_modules\vue\dist\vue.runtime.common.js:3223:10) at C:\project\code\nodejs\dbserver\node_modules\vue-pouch\index.js:169:12 at Array.map (native) at VueComponent.created (C:\project\code\nodejs\dbserver\node_modules\vue-pouch\index.js:160:33)
Sorry about this. Will rewrite the documentation.
Hello, can you provide example with remote server, please.. following the example throws this error