diff --git a/examples/keyvalue.js b/examples/keyvalue.js index f0a9855..1e17dd6 100644 --- a/examples/keyvalue.js +++ b/examples/keyvalue.js @@ -2,8 +2,8 @@ const async = require('asyncawait/async'); const await = require('asyncawait/await'); -const IPFS = require('ipfs') -// const ipfsd = require('ipfsd-ctl'); +// const IPFS = require('ipfs') +const ipfsd = require('ipfsd-ctl'); const OrbitDB = require('../src/OrbitDB'); const Timer = require('./Timer'); @@ -17,14 +17,14 @@ const channelName = process.argv[3] ? process.argv[3] : 'c1'; const startIpfs = () => { return new Promise((resolve, reject) => { - // ipfsd.disposableApi((err, ipfs) => { - // if(err) console.error(err); - // resolve(ipfs); - // }); - const ipfs = new IPFS() - ipfs.goOnline(() => { - resolve(ipfs) - }) + ipfsd.disposableApi((err, ipfs) => { + if(err) console.error(err); + resolve(ipfs); + }); + // const ipfs = new IPFS() + // ipfs.goOnline(() => { + // resolve(ipfs) + // }) }); };