go-example-server

module
v0.0.0-...-bcd07de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2022 License: MIT

README

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

Directories

Path Synopsis
cmd
internal
pb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL