OrbitDB store backed by PouchDB.
javascript
const PouchStore = require('orbit-db-pouch')
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')
const ipfs = new IPFS()
const orbitdb = await OrbitDB.createInstance(ipfs)
`
Add custom datastore type
`javascript
OrbitDB.addDatabaseType("pouch", PouchStore)
`
Create a datastore with a schema. In this example we're saving baseball players. We'll add 4 different indexed fields. Indexes and can unique.
`javascript
store = await orbitdb.open("baseballplayers", {
create: true,
type: "pouch"
})
`
Once opened the PouchDB can be accessed with ".db":
`javascript
await store.db.allDocs() //see PouchDB documentation for more.
``