How to use the orbit-db.addDatabaseType function in orbit-db

To help you get started, we’ve selected a few orbit-db 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 fazo96 / ipfs-boards / src / orbitdb / index.js View on Github external
export async function start() {
  if (!window.ipfs) {
    window.ipfs = new IPFS({
      repo: 'ipfs-v6-boards-v0',
      EXPERIMENTAL: {
        pubsub: true
      }
    });
    await new Promise(resolve => {
      window.ipfs.on('ready', () => resolve())
    })
  }
  if (!window.orbitDb) {
    OrbitDB.addDatabaseType(BoardStore.type, BoardStore)
    window.orbitDb = new OrbitDB(window.ipfs)
  }
}

orbit-db

Distributed p2p database on IPFS

MIT
Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis