/vuejs-pouchdb

Using PouchDB in Vue2

Primary LanguageJavaScriptMIT LicenseMIT

Vuejs-pouchdb

Using pouchdb in vue

install

npm i vuejs-pouchdb --save

using

setup

import Vue from 'vue'
import VuePouchDB from 'vuejs-pouchdb'

Vue.use(VuePouchDB, { name: 'test-db' })

using in components

this.$pouch.get('name')
    .then(data => {
        console.log(data)
    })

and: Vue.pouch VuePouchDB.pouchdb

install plugins

import Vue from 'vue'
import VuePouchDB from 'vuejs-pouchdb'
import PouchDbDebug from 'pouchdb-debug'

VuePouchDB.plugin(PouchDebug)
// enable debug
VuePouchDB.pouchdb.debug.enable('*')

Vue.use(VuePouchDB, { name: 'test-db' })

License

ISC