Code your own blockchain in less than 200 lines of Go!
Read our blog post first to see a walkthrough of the code.
git clone https://github.com/mycoralhealth/blockchain-tutorial.git
- navigate to this directory and rename the example file
mv example.env .env
go run main.go
- open a web browser and visit
- to write new blocks, send a
POSTrequest (I like to use Postman) to
http://localhost:8080/with a JSON payload with
BPMas the key and an integer as the value. For example:
- Send as many requests as you like and refresh your browser to see your blocks grow! Use your actual heart rate (Beats Per Minute) to track it over time.