From c2fcccc236d47607957bbd8385779b0bd1de7184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?haz=C3=A641?= Date: Mon, 11 Nov 2019 15:46:22 +0100 Subject: [PATCH 1/2] Update README.md pubsub enabled by default --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index b6787b3..b6c20f1 100644 --- a/README.md +++ b/README.md @@ -90,18 +90,9 @@ npm install orbit-db ipfs ```javascript const IPFS = require('ipfs') const OrbitDB = require('orbit-db') -// OrbitDB uses Pubsub which is an experimental feature -// and need to be turned on manually. -// Note that these options need to be passed to IPFS in -// all examples even if not specified so. -const ipfsOptions = { - EXPERIMENTAL: { - pubsub: true - } -} // Create IPFS instance -const ipfs = new IPFS(ipfsOptions) +const ipfs = new IPFS() ipfs.on('error', (e) => console.error(e)) ipfs.on('ready', async () => { 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 2/2] 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)