node.js - Pouchdb <> Couchdb sync : how to structure code -
imagine setup node/express/vue project :
- desktop app (electron) : writes pouchdb (offline first) possibility sync remote db.
- web app (online) : uses api server calls write couchdb
so :
- pouchdb on client
- couchdb on server
these 2 use same data , know can sync (master-master db) them.
i'm wondering how manage code achieve this.
- is possible use same controllers/models interact both databases?
- or have write controllers/models on server interact couchdb , write other controllers/models on client interact pouchdb?
- how structure project ?
thank clarify this, can't seem find clear answer , i'm total noob.
Comments
Post a Comment