ipfs-mini icon indicating copy to clipboard operation
ipfs-mini copied to clipboard

How to check if IPFS is online

Open micheldejoode opened this issue 7 years ago • 2 comments

Hi, thanks for this great library! I have a question, I want to do a check if IPFS is online, before I give a command like "cat". In the full IPFS.js there is ipfs.isOnline, but this is not available in this library. Is there another way to check? Of do I have to just do for example a "cat" command, and see if it gives an error?

micheldejoode avatar Mar 12 '18 08:03 micheldejoode

If you can find the API call in the IPFS API docs, and might be able to add something. Not sure on an exact way to approach that though

Sent from my iPhone

On Mar 12, 2018, at 9:07 AM, Michel de Joode [email protected] wrote:

Hi, thanks for this great library! I have a question, I want to do a check if IPFS is online, before I give a command like "cat". In the full IPFS.js there is ipfs.isOnline, but this is not available in this library. Is there another way to check? Of do I have to just do for example a "cat" command, and see if it gives an error?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

SilentCicero avatar Mar 12 '18 09:03 SilentCicero

Ok thanks, I will look at it.

micheldejoode avatar Mar 12 '18 10:03 micheldejoode