Skip to content

Commit 58715e7

Browse files
committed
External port logging
1 parent 1d8885e commit 58715e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/config/config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ func GetConfig() *Config {
9595
envPort := os.Getenv("PORT")
9696
if envPort != ""{
9797
cfg.Server.ExternalPort = envPort
98-
log.Printf("Set external port from environment -> %s", envPort)
98+
log.Printf("Set external port from environment -> %s", cfg.Server.ExternalPort)
99+
}else{
100+
cfg.Server.ExternalPort = cfg.Server.InternalPort
101+
log.Printf("Set external port from environment -> %s", cfg.Server.ExternalPort)
99102
}
100103
if err != nil {
101104
log.Fatalf("Error in parse config %v", err)

0 commit comments

Comments
 (0)