Update example

This commit is contained in:
haad 2016-05-19 15:20:39 +02:00
parent b354b55c33
commit ae4f52ae29

View File

@ -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)
// })
});
};