From 1010bb09ab063c66016a2e90690ffd422e7ff032 Mon Sep 17 00:00:00 2001 From: mudler Date: Wed, 6 Nov 2024 16:11:58 +0100 Subject: [PATCH] feat(main): allow to set a listen address Signed-off-by: mudler --- cmd/tee-worker/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/tee-worker/main.go b/cmd/tee-worker/main.go index bb91cb1..836f5c0 100644 --- a/cmd/tee-worker/main.go +++ b/cmd/tee-worker/main.go @@ -2,10 +2,16 @@ package main import ( "context" + "os" "github.com/masa-finance/tee-worker/internal/api" ) func main() { - api.Start(context.Background(), ":8080") + listenAddress := os.Getenv("LISTEN_ADDRESS") + if listenAddress == "" { + listenAddress = ":8080" + } + + api.Start(context.Background(), listenAddress) }