Learning golang for servers and microservices
The server processes can be started locally
with the make command below.
REST and gRPC servers
make server # starts the REST & gRPC server
OR Docker
docker-compose up
HTTP client
curl http://localhost:3000/product # all items
curl https://localhost:3000/product/1 # single item
gRPC client
bash ./client.sh # returns a single item through gRPC
bash ./client.sh -all # returns a stream of items through gRPC
OR.
with grpcurl
grpcurl -d '{"id": "2"}' --plaintext localhost:3000 Product.GetProduct # get single
grpcurl --plaintext localhost:3000 Product.GetProducts # get all
Project can be pulled from docker hub and run directly from docker
docker pull lordvidex/goserver:latest