docs: Use Helia. Use createOrbitDB.

This commit is contained in:
Hayden Young 2024-01-29 23:49:19 +00:00
parent d6b9c41095
commit 8c29b77eab
2 changed files with 8 additions and 8 deletions

View File

@ -3,11 +3,11 @@
* @memberof module:Databases
* @description Documents database.
* @example <caption>Create documents db with custom index</caption>
* import { create } from 'IPFS'
* import { OrbitDB, Documents } from 'orbitdb'
* import { createHelia } from 'helia'
* import { createOrbitDB, Documents } from 'orbitdb'
*
* const ipfs = create()
* const orbitdb = await OrbitDB({ ipfs })
* const ipfs = createHelia()
* const orbitdb = await createOrbitDB({ ipfs })
* const db = await orbitdb.open('my-docs', { Database: Documents({ indexBy: 'myCustomId'} ) }
*
* @augments module:Databases~Database

View File

@ -6,12 +6,12 @@
*
* Key-value pairs are stored to the configured storage.
* @example <caption>Specify a custom storage</caption>
* import { create } from 'IPFS'
* import { OrbitDB, KeyValueIndexed, IPFSBlockStorage } from 'orbitdb'
* import { createHelia } from 'helia'
* import { createOrbitDB, KeyValueIndexed, IPFSBlockStorage } from 'orbitdb'
*
* const ipfs = create()
* const ipfs = createHelia()
* const storage = await IPFSBlockStorage({ ipfs })
* const orbitdb = await OrbitDB({ ipfs })
* const orbitdb = await createOrbitDB({ ipfs })
* const db = await orbitdb.open('my-kv', { Database: KeyValueIndexed({ storage }) })
*
* @augments module:Databases~Database