Skip to content

A sample repo containing gRPC and REST API implementations written in Go

License

Notifications You must be signed in to change notification settings

arunkpatra/go-grpc-http-rest-microservice-tutorial

Repository files navigation

gRPC and REST API using Golang

Build Status Coverage Status

Based on these tutorials:

Build

  • Run Protoc

    ./third_party/protoc-gen.sh
    
  • Build Server

    cd cmd/server
    go build
    
  • Build REST and gRPC Clients

    cd cmd/client-rest
    go build
    
    cd cmd/client-grpc
    go build
    

Running

Build Docker Image

docker build . -t go-dock  
docker run -d -p 8080:8080,9090:9090 --name=go-dock --env DB_HOST=localhost:3306,DB_USER=root,DB_PASSWORD=**********,DB_SCHEMA=mysql go-dock
docker run -it -p 8080:8080,9090:9090 --name=go-dock --env DB_HOST=localhost:3306,DB_USER=root,DB_PASSWORD=**********,DB_SCHEMA=mysql go-dock

MySQL

docker pull mysql/mysql-server:latest
docker images
docker run --name=mysql -d mysql/mysql-server:latest

About

A sample repo containing gRPC and REST API implementations written in Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published