Skip to content

Commit

Permalink
(fix): use env for service address in client
Browse files Browse the repository at this point in the history
  • Loading branch information
kameshsampath committed Dec 5, 2023
1 parent 405ab2f commit 307cc67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"io"
"os"
"time"

"github.com/kameshsampath/demo-protos/golang/todo"
Expand All @@ -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)
Expand Down

0 comments on commit 307cc67

Please sign in to comment.