/gin-auth2-swagger-demo

A Restful API Server BY GOLANG

Primary LanguageGo

Important Step one by one

Gen doc

$ go get -u github.com/swaggo/swag/cmd/swag
$ swag init

Run app

$ go run main.go

Build

set CGO_ENABLED=0 GOOS=linux 
go build -a -installsuffix cgo -o gin-auth2-swagger-demo .

Build image in Mac

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gin-auth2-swagger-demo .

Run

 docker run -itd -p 80:80 --rm --name demo gin-auth2-swagger-demo

open swagger