LorranSutter / IPFS-demo

Simple demo of IPFS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IPFS Demo

Demo of IPFS usage using ReactJS and IPFS HTTP client presented as lab assingment for BCDV1011 - Design Patterns for Blockchain from Blockchain Development program from George Brown College.

🏃 How to run

Open your terminal in the folder you want to clone the project

# Clone this repo
git clone https://github.com/LorranSutter/IPFS-demo.git

# Go to the project folder
cd IPFS-demo

# Install dependencies
yarn

Now you will need two opened terminals to run the project. One for IPFS and another one for the frontend.

IPFS will run on http://127.0.0.1:5001/

Frontend will run on http://localhost:3000/

In this project I have employed go-ipfs. You may download and install here. In windows you just have to click on the executable file to run IPFS. In both Linux and Mac you may follow command line of these steps.

If you are running IPFS locally there is a great chance of having problems due to cross-origin requests, because there will be requests from localhost:3000 to 127.0.0.1:5001. To fix that you may access IPFS web UI and change JSON configuration file adding the following code in API key:

"API": {
	"HTTPHeaders": {
		"Access-Control-Allow-Methods": ["GET","POST","PUT"],
		"Access-Control-Allow-Origin": ["*"]
		}
	}
## In the another terminal ##

# Run the project
yarn start

📖 Resources and technologies 💻

About

Simple demo of IPFS


Languages

Language:JavaScript 85.3%Language:CSS 8.9%Language:HTML 5.8%