How to use the pouchdb/dist/pouchdb.plugin function in pouchdb

To help you get started, we’ve selected a few pouchdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paulsutherland / Polyonic / src / app / data.service.ts View on Github external
.then(() => {
        // Go for either an encrypted db or encrypted data
        // There is a greater performance hit on the encrypted data option
        PouchDB.plugin(cordovaSqlitePlugin)
        return ctx.db = new PouchDB('app.db', {
          adapter: 'cordova-sqlite',
          key: 'secret', // <<<<<<<<<<<<< Replace with your secret key
          iosDatabaseLocation: 'Documents'
        })
        // PouchDB.plugin(SecurePouch)
        // ctx.db = new PouchDB('app.db')
        // ctx.db.securePouch('secret') // <<<<<<<<<<<<< Replace with your secret key
      })
      .then(res => {
github paulsutherland / Polyonic / src / app / data.service.ts View on Github external
.then(() => {
        PouchDB.plugin(SecurePouch)
        return ctx.db = new PouchDB('app.db')

      })
      .then(res => {