Skip to content

ahnafms/crud-grpc-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD GRPC Go

Preparation

Make sure you have installed the applications listed below :

How To Run

  1. Git clone this repository
  2. Go to the proto directory and run this code in your terminal
protoc *.proto --go_out=. --go-grpc_out=.
  1. Then you'll have the grpc code generated in pkg/protobuf directory.
  2. Setup mysql database configurations in pkg/database/db.go, if you have your own setup feel free to change it based on your own configurations.
  3. After that run the application. Make sure to run it in root directory
go run cmd/app/main.go
  1. Last but not least, import your proto file to POSTMAN

Make a request

  1. After importing proto file to POSTMAN, you'll have the all the MovieServices automatically generated

Screenshot 2023-04-02 at 18 49 20

  1. Choose the service that you'd like to test, ex : CreateMovies

Screenshot 2023-04-02 at 18 49 20

  1. Click on Example Message and POSTMAN automatically generate example message that you can directly send

  2. Example response if success

Screenshot 2023-04-02 at 19 04 27

About

Basic GRPC for Create Read Update Delete Methods in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages