Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.12 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.12 KB

Building a Simple Blockchain with Go

In this tutorial, I'll attempt to demystify the broad concept of the blockchain, by helping you write a simple Blockchain in Go.

Tutorial

Read Now

Installation/Usage

Clone Repository

$ git clone https://github.com/codehakase/blockchain-golang-tutorial.git

Run app

$ go run blockchain.go

Create Blocks

$ curl -X POST http://localhost:3000/new \
	-H "Content-Type: application/json" \
	-d '{"title": "Sample Book", "author":"John Doe", "isbn":"909090","publish_date":"2018-05-26"}'

$ curl -X POST http://localhost:3000 \
	-H "Content-Type: application/json" \
	-d '{"book_id": "generated_id", "user": "Mary Doe", "checkout_date":"2018-05-28"}'

View in Browser Navigate to http://localhost:3000 to view the full blocks

Screenshot

golang-blockchain-terminal-prev golang-blockchain-main