From 6d4f7bb3bc18c731f7376f6925e346f4007d81ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?haz=C3=A641?= Date: Mon, 11 Nov 2019 16:45:50 +0100 Subject: [PATCH] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b6c20f1..242b809 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,18 @@ const IPFS = require('ipfs') const OrbitDB = require('orbit-db') // Create IPFS instance + +// For js-ipfs >= 0.38 const ipfs = new IPFS() +// For js-ipfs < 0.38 +const ipfsOptions = { + EXPERIMENTAL: { + pubsub: true + } +} +const ipfs = new IPFS(ipfsOptions) + ipfs.on('error', (e) => console.error(e)) ipfs.on('ready', async () => { const orbitdb = await OrbitDB.createInstance(ipfs)