Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
go-rest-template Makefile
get-docs:
go get -u github.com/swaggo/swag/cmd/swag
docs: get-docs
swag init --dir cmd/api --parseDependency --output docs
build:
go build -o bin/restapi cmd/api/main.go
run:
go run cmd/api/main.go
test:
go test -v ./test/...
build-docker: build
docker build . -t api-rest
run-docker: build-docker
docker run -p 3000:3000 api-rest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment