mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Change the readme example code to use await
This commit is contained in:
@@ -139,11 +139,9 @@ const OrbitDB = require('orbit-db')
|
||||
|
||||
const ipfs = IpfsClient('localhost', '5001')
|
||||
|
||||
OrbitDB.createInstance(ipfs).then(async (orbitdb) => {
|
||||
const db = await orbitdb.log('hello')
|
||||
// Do something with your db.
|
||||
})
|
||||
|
||||
const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
const db = await orbitdb.log('hello')
|
||||
// Do something with your db.
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Reference in New Issue
Block a user