Change the readme example code to use await
This commit is contained in:
parent
691730a69f
commit
d8f8a47768
@ -139,11 +139,9 @@ const OrbitDB = require('orbit-db')
|
|||||||
|
|
||||||
const ipfs = IpfsClient('localhost', '5001')
|
const ipfs = IpfsClient('localhost', '5001')
|
||||||
|
|
||||||
OrbitDB.createInstance(ipfs).then(async (orbitdb) => {
|
const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||||
const db = await orbitdb.log('hello')
|
const db = await orbitdb.log('hello')
|
||||||
// Do something with your db.
|
// Do something with your db.
|
||||||
})
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
Loading…
x
Reference in New Issue
Block a user