mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Update README.md
pubsub enabled by default
This commit is contained in:
11
README.md
11
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 () => {
|
||||
|
||||
Reference in New Issue
Block a user