Opinionated GRPC service with embedded GRPC Gateway for REST HTTP.
- grpc code generated with Buf CLI
- postgres for SQL database
- sql migrations with Goose
- generated sql methods with sqlc with pgx
go install \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
google.golang.org/protobuf/cmd/protoc-gen-go \
google.golang.org/grpc/cmd/protoc-gen-go-grpc \
github.com/sqlc-dev/sqlc/cmd/sqlc \
github.com/pressly/goose/v3/cmd/goose
Install Buf CLI
buf generate
sqlc generate
go run . serve
goose -dir db/migrations create DESCRIPTIVE_FILENAME sql