callback after connection to ipfs
HamzaBinSarfraz opened this issue · 3 comments
HamzaBinSarfraz commented
const ipfsClient = require('ipfs-http-client');
const ipfs = new ipfsClient({
host: 'ipfs.infura.io',
port: 5001,
protocol: 'https'
});
is there any callback which confirm me that i am successfully connected to ipfs ?
achingbrain commented
No, because the client doesn't make any requests to the node until API methods are invoked.
If you want to confirm the config is valid and you can communicate with the node, you could call a cheap API method after construction like ipfs.id()?
alanshaw commented
Hope that answeres your question @HamzaBinSarfraz - let us know if not.
HamzaBinSarfraz commented
Indeed, Thanks @achingbrain @alanshaw