How to use IPFS from a Javascript application without starting ipfs node?

I have a javascript application (ReactJs) that will work as a hybrid Android application on mobile devices. I do not want to run the full IPFS node on the mobile device, because it will consume a lot of its memory and energy. How can I connect my application to IPFS and then?

I saw https://github.com/ipfs/js-ipfs-api#importing-the-module-and-usage , but it does not look usable by the mobile device again since it works as a shared service.

Maybe I need to connect to some IPFS node on the Internet through the IPFS API ( https://ipfs.io/docs/api/ ), however is there a way to detect running nodes at runtime, and also choose the fastest / closest?

+4
source share
2 answers

Here you have several options:

  • You can host IPFS node in some cloud and connect all your mobile devices to it.
  • Launch the js-ipfsnode instance when you need it, and then garbage collects it.

PWA? js-ipfs Chrome Android, https://github.com/ipfs/js-ipfs/tree/master/examples, , .

+2

, , , IPFS . , . , . , , , , . . , .

... ipfs node. , , . IPFS, , 8 , , .

, , . Google, , .

, Steemit, , IPFS. . IPFS, Swarm, Web3 Dapps .

, node :

<form action="http://[domain_name]:[port_number]/ipfs/api/v0/add" enctype="multipart/form-data" method="post">
    <input type="file" name="image" accept="image/*"/>
    <input type="submit"/>
</form>
Hide result

!

+3

Source: https://habr.com/ru/post/1682560/


All Articles