Files
services/translate/Makefile
zhaoyang 4ec7a7aa5c feat: add translation API (#297)
* feat: add translation

* feat: resurface translation by Google Translation

* feat: renamed the service as `translate` to make more readable

* fix: renamed response and request name to match rpc name

* chore: delete useless blank line

* Update publicapi.json

* Update publicapi.json

* Update README.md

Co-authored-by: Asim Aslam <asim@aslam.me>
2021-12-10 10:15:57 +00:00

29 lines
586 B
Makefile

GOPATH:=$(shell go env GOPATH)
.PHONY: init
init:
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go
go get github.com/micro/micro/v3/cmd/protoc-gen-micro
go get github.com/micro/micro/v3/cmd/protoc-gen-openapi
.PHONY: api
api:
protoc --openapi_out=. --proto_path=. proto/translate.proto
.PHONY: proto
proto:
protoc --proto_path=. --micro_out=. --go_out=:. proto/translate.proto
.PHONY: build
build:
go build -o translate*.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t translate:latest