Skip to content

⛓️ This simple blockchain was made following Coral Health's post on Medium. It has educational purposes only.

Notifications You must be signed in to change notification settings

gpressutto5/blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Simple Blockchain

This simple blockchain was made following Coral Health's post on Medium. It has educational purposes only.

Getting started

Run

git clone https://github.com/gpressutto5/blockchain.git
cd blockchain
cp .env.example .env

go get github.com/davecgh/go-spew/spew
go get github.com/gorilla/mux
go get github.com/joho/godotenv

go run main.go

You can change the listening port on .env. The default port is 80.

You can add new blocks to the chain by sending a POST with a JSON, like this:

curl -H "Content-Type: application/json" -X POST -d '{"Value":50}' http://localhost

You can view the whole blockchain by accessing your localhost or sending a GET request, like this:

curl http://localhost

About

⛓️ This simple blockchain was made following Coral Health's post on Medium. It has educational purposes only.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages