blockchain-golang-tutorial

[Article Source file] Building a Simple Blockchain with Go

Stars
24
Committers
1

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