Skip to content

widyan/go-http-over-grpc

Repository files navigation

Go Http Over GRPC

How to Install Protocol Buffers on Windows?

How to Install Buf on Windows?

  • Browse https://docs.buf.build/installation
  • Download Buf for Windows and rename file become buf.exe
  • Route file buf.exe to environment variabel ‘System variables’ in variabel path
  • Create file buf.gen.yml
  • Execute command buf mod update
  • Always run buf mod update after adding a dependency to your buf.yaml

Generate File Proto (Old Way)

  • To folder /proto
  • Exec ./get-googleapi.sh (Only 1 exec for create library)
  • Create file xxxxx.proto
  • Exec cmd protoc --proto_path=. v1/*.proto --go_out=plugins=grpc:./ --grpc-gateway_out=:./

Generate File Proto and generate OpenAPI in folder third party (New Way)

  • Exec command buf generate

Running apps

  • Add .env (reference from .env.example)
  • Exec command go run .
  • If success, run http://localhost:7000 swagger URI from browser

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published