Plugin for Vue.js to provide access to Hoodie client
npm install https://github.com/SergeyRyzhov/vue-hoodie.git --save
// imports
import Vue from 'vue'
import VueHoodie from 'vue-hoodie'
Vue.use(VueHoodie);
// setup Hoodie (please check official documentation)
import Hoodie from '@hoodie/client'
import PouchDB from 'pouchdb';
const hoodie = new Hoodie({
PouchDB,
url: 'http://localhost:8080'
});
// use in root app
new Vue({
...
hoodie,
...
}).$mount('#app')
Now you can access Hoodie client in any component
this.$hoodie