From 307cc6777455402c209f0d7a1594042ffd5082cc Mon Sep 17 00:00:00 2001 From: Kamesh Sampath Date: Tue, 5 Dec 2023 10:35:52 +0530 Subject: [PATCH] (fix): use env for service address in client --- cmd/client/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/client/main.go b/cmd/client/main.go index 4a42bb1..c6842fb 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -3,6 +3,7 @@ package main import ( "context" "io" + "os" "time" "github.com/kameshsampath/demo-protos/golang/todo" @@ -19,7 +20,7 @@ func main() { defer logger.Sync() log := logger.Sugar() - conn, err := grpc.Dial("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.Dial(os.Getenv("SERVICE_ADDRESS"), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { log.Fatal(err)