SilentCicero / ipfs-mini

A super tiny module for querying IPFS that works in the browser and node.
MIT License
152 stars 40 forks source link

How to check if IPFS is online #8

Open micheldejoode opened 6 years ago

micheldejoode commented 6 years ago

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?

SilentCicero commented 6 years ago

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 notifications@github.com 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.

micheldejoode commented 6 years ago

Ok thanks, I will look at it.