Skip to content

Big-Vi/grpc-go-postgres-crud

Repository files navigation

Install grpc-go

go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]

Create proto files

protoc --go_out=. --go-grpc_out=. orderpb/order.proto

Atlas schema migration

atlas schema inspect -u "postgres://postgres:root@localhost:3002/realtime-dashboard-grpc?sslmode=disable" > migrations/schema.hcl
atlas schema apply -u "postgres://postgres:root@localhost:3002/realtime-dashboard-grpc?sslmode=disable" --to file://migrations/schema.hcl

Run server

docker compose -f docker-compose.yml up

Run client

go run client/client.go

Releases

No releases published

Packages

No packages published