Fluence Network

The Fluence Labs Developer Hub

Welcome to the Fluence Labs developer hub. You'll find comprehensive guides and documentation to help you start working with Fluence Labs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Should you have any questions, feel free to join our Discord or Telegram!

Get Started    API Reference

Publish a Website to IPFS

The website with Fluence backend and static resources on IPFS

Motivation

Fluence nodes are stateful but it is wasteful to store website (or something else) static resources on them. We can use decentralized storage like IPFS to store static resources and save the decentralized state of the whole system.

Requirements

How To

First of all, we need already written frontend interacting with Fluence nodes.

And then let's upload directory with built frontend code:

IPFS_ADDR=$(host ipfs.fluence.one | awk '/has address/ { print $4 }' | head -n1)
ipfs --api /ip4/$IPFS_ADDR/tcp/5001 add -r path/to/built/frontend

IPFS_ADDR - is a ipfs.fluence.one ip address

This command will return a hash of directory. We can check if the directory is uploaded by opening a link with this hash: http://ipfs.fluence.one:8080/ipfs/<IpfsHash>

That's it! Now your frontend code is available with this link: http://ipfs.fluence.one:8080/ipfs/<IpfsHash>/index.html

Note, that if your entrypoint is not index.html, change the link to right one.

Publish a Website to IPFS


The website with Fluence backend and static resources on IPFS

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.