Make sure you have installed the applications listed below :
- Go (https://go.dev/)
- Proto compiler for Go (https://grpc.io/docs/languages/go/quickstart/)
- Git clone this repository
- Go to the proto directory and run this code in your terminal
protoc *.proto --go_out=. --go-grpc_out=.
- Then you'll have the grpc code generated in pkg/protobuf directory.
- 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.
- After that run the application. Make sure to run it in root directory
go run cmd/app/main.go
- Last but not least, import your proto file to POSTMAN
- After importing proto file to POSTMAN, you'll have the all the MovieServices automatically generated
- Choose the service that you'd like to test, ex : CreateMovies
-
Click on Example Message and POSTMAN automatically generate example message that you can directly send
-
Example response if success