Change the readme example code to use await

This commit is contained in:
haad 2019-04-03 08:14:41 +00:00
parent 691730a69f
commit d8f8a47768

View File

@ -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