Skip to content

lordvidex/go-example-server

Repository files navigation

go-example-server Go Reference

Learning golang for servers and microservices

How To Run?

Server

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

Client

HTTP

HTTP client

curl http://localhost:3000/product # all items
curl https://localhost:3000/product/1 # single item

GRPC

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

DockerHub pull project directly from docker

Project can be pulled from docker hub and run directly from docker

docker pull lordvidex/goserver:latest

Releases

No releases published

Packages

No packages published

Languages