diff --git a/README.md b/README.md index b6787b3..242b809 100644 --- a/README.md +++ b/README.md @@ -90,17 +90,18 @@ 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. + +// Create IPFS instance + +// For js-ipfs >= 0.38 +const ipfs = new IPFS() + +// For js-ipfs < 0.38 const ipfsOptions = { EXPERIMENTAL: { pubsub: true } } - -// Create IPFS instance const ipfs = new IPFS(ipfsOptions) ipfs.on('error', (e) => console.error(e))