commit
7ef7ee2e79
13
README.md
13
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user