ipns-ipfs plugin: handling lack of IPFS

merge-requests/1/head
Michał 'rysiek' Woźniak 2021-08-25 20:35:59 +00:00
rodzic 2f639112af
commit 83ece2adb2
1 zmienionych plików z 15 dodań i 11 usunięć

Wyświetl plik

@ -65,23 +65,27 @@
doImport(
"./lib/ipfs.js");
console.log('(COMMIT_UNKNOWN) Setting up IPFS...')
ipfs = await self.Ipfs.create({
config: {
dht: {
enabled: true,
clientMode: true
}
},
libp2p: {
try {
ipfs = await self.Ipfs.create({
config: {
dht: {
enabled: true,
clientMode: true
}
},
libp2p: {
config: {
dht: {
enabled: true,
clientMode: true
}
}
}
}
});
console.log('+-- IPFS loaded :: ipfs is : ' + typeof ipfs)
});
console.log('+-- IPFS loaded :: ipfs is : ' + typeof ipfs)
} catch(e) {
console.error('+-- Error loading IPFS: ' + e)
}
}
}