Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 525 Bytes

Step01.md

File metadata and controls

48 lines (32 loc) · 525 Bytes

Step 1. Initialize

Install Go

https://golang.org/dl/

Init a project

mkdir realworld
cd realworld
go mod init example.com/realworld

Create the main.go

cmd/main.go

package main

import "fmt"

func main() {
	fmt.Println("RealWorld back-end.")
}

Install HTTP client

go get -u github.com/astaxie/bat

Run

go run cmd/main.go

Get a result

go run github.com/astaxie/bat GET 127.0.0.1:3333
# or
# bat GET 127.0.0.1:3333