Skip to content

bellacbs/posts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

== Posts - Golang ==

About   |   What works   |   In development   |   Requirements   |  

📓 About

🚀 Project developed to demonstrate two type of gRPC (Unary and Server Streaming)

🛠 Technologies and programming languages

The following libraries and languages were used in the project's construction:

  • Go
  • gRPC
  • Makefile
  • Gin

✔️ What works

  • Send Posts using unary call;
  • Receiving new posts in real time using Server Streaming;

🚧 In development

  • Client streaming;
  • Bidirectional streaming;
  • JS client;
  • Clean Architecture;

↩️ Prerequisites

Before you start, you will need to have the following tools installed on your machine: Git, Go, gRPC and Protobuffer package dependencies and if you want the development mode, install gin to live reload. Additionally, it's good to have a code editor to work with, such as VSCode

Installing protobuffer

Linux

sudo apt install -y protobuf-compiler

MacOS

brew install protobuff

gRPC and Protobuffer package dependencies

go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2

NOTE: You should add the protoc-gen-go-grpc to your PATH

export PATH="$PATH:$(go env GOPATH)/bin"

Install gin

go get github.com/codegangsta/gin
go install github.com/codegangsta/gin

🏁 Running the project

# Clone this repository

# To start the server as dev
$ make run dev

# To build and start server
$ make run build
$ make run run

# The server will start on port 50051 - access it on <grpc://localhost:50051>

# To run client, in the source of this directory, open a new terminal, and execute 
$ go run client/golang/main.go

# you can also use clients like Postman and Insomnia by importing the proto file at /proto/post.proto

Go back to the top

About

project in go using grpc using call like Unary and Server Streaming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published