Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Write and publish your own blockchain in less than 200 lines of Go

Notifications You must be signed in to change notification settings

d6a0r0t/blockchain-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code your own blockchain in less than 200 lines of Go!

Tutorial

Read our blog post first to see a walkthrough of the code.

Check out our follow-up tutorials:

Deployment steps:

  • 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 http://localhost:8080/
  • to write new blocks, send a POST request (I like to use Postman) to http://localhost:8080/ with a JSON payload with BPM as the key and an integer as the value. For example:
{"BPM":50}
  • 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.

Screenshot

screen

About

Write and publish your own blockchain in less than 200 lines of Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%