mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
docs: Use Helia. Use createOrbitDB.
This commit is contained in:
parent
d6b9c41095
commit
8c29b77eab
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user