From d8f8a47768e892fef4beabd8afe17494c2e48d76 Mon Sep 17 00:00:00 2001 From: haad Date: Wed, 3 Apr 2019 08:14:41 +0000 Subject: [PATCH] Change the readme example code to use await --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8595d6f..bd3b59f 100644 --- a/README.md +++ b/README.md @@ -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