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 async = require('asyncawait/async');
const await = require('asyncawait/await'); const await = require('asyncawait/await');
const IPFS = require('ipfs') // const IPFS = require('ipfs')
// const ipfsd = require('ipfsd-ctl'); const ipfsd = require('ipfsd-ctl');
const OrbitDB = require('../src/OrbitDB'); const OrbitDB = require('../src/OrbitDB');
const Timer = require('./Timer'); const Timer = require('./Timer');
@ -17,14 +17,14 @@ const channelName = process.argv[3] ? process.argv[3] : 'c1';
const startIpfs = () => { const startIpfs = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// ipfsd.disposableApi((err, ipfs) => { ipfsd.disposableApi((err, ipfs) => {
// if(err) console.error(err); if(err) console.error(err);
// resolve(ipfs); resolve(ipfs);
// }); });
const ipfs = new IPFS() // const ipfs = new IPFS()
ipfs.goOnline(() => { // ipfs.goOnline(() => {
resolve(ipfs) // resolve(ipfs)
}) // })
}); });
}; };