Save PouchDB documents in custom directory on Electron App


#1

Hi community,

Do you know if i can change the PouchDB directory in Electron App ? When i update my App (re-install new version), all my data is destroyed.

I try this :

const Presentation = new PouchDB('~/pouchdb/presentation');

But return an error :

err {type: "OpenError", name: "OpenError", cause: Error: IO error: ~/pouchdb/presentation/LOCK: Aucun ficerr {type: "OpenError", name: "OpenError", cause: Error: IO error: ~/pouchdb/presentation/LOCK: Aucun fichier ou dossier de ce type, message: "IO error: ~/pouchdb/presentation/LOCK: Aucun fichier ou dossier de ce type", stack: "OpenError: IO error: ~/pouchdb/presentation/LOCK: …es/abstract-leveldown/abstract-leveldown.js:39:16"}

Anyone have idea for change directory ?

Thank you community !