Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Help request: How can the pouch-worker module used? #35

Open
BananaAcid opened this issue Oct 21, 2019 · 1 comment
Open

Help request: How can the pouch-worker module used? #35

BananaAcid opened this issue Oct 21, 2019 · 1 comment
Labels

Comments

@BananaAcid
Copy link

Is there any known solution to get vue-pouch running in a woker? Or could this work / how could this be integrated?

@MDSLKTR
Copy link
Owner

MDSLKTR commented Oct 31, 2019

I suspect it should work. So when you plug the Pouch Instance into Vue, you instead plug this

// client-side code
var PouchDB = require('pouchdb');
PouchDB.adapter('worker', require('worker-pouch/client'));

var worker = new Worker('worker.js');

var db = new PouchDB('mydb', {
  adapter: 'worker',
  worker: worker
});

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants