rnrodrigues / demo_json_go

Demo responses with json in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Demo API

A tiny demo written in GO that show how to use JSON responses in an API.

Usage

Clone this repo:

git clone https://github.com/rnrodrigues/demo_json_go.git

Run command on terminal to compile:

CGO_ENABLED=0 GOOS=linux go build -a --installsuffix cgo --ldflags="-s" -o server

or run shell script:

sh build.sh

Run commands below to build and run docker image:

sudo docker build -t mytinyapi .
sudo docker run --rm -it -p 8080:8080 mytinyapi

That's it!

About

Demo responses with json in Go.


Languages

Language:Go 88.1%Language:Shell 11.9%