File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -93,16 +93,17 @@ func GetConfig() *Config {
9393 }
9494
9595 cfg , err := ParseConfig (v )
96+ if err != nil {
97+ log .Fatalf ("Error in parse config %v" , err )
98+ }
99+
96100 envPort := os .Getenv ("PORT" )
97101 if envPort != "" {
98102 cfg .Server .ExternalPort = envPort
99103 log .Printf ("Set external port from environment -> %s" , cfg .Server .ExternalPort )
100104 } else {
101105 cfg .Server .ExternalPort = cfg .Server .InternalPort
102- log .Printf ("Set external port from environment -> %s" , cfg .Server .ExternalPort )
103- }
104- if err != nil {
105- log .Fatalf ("Error in parse config %v" , err )
106+ log .Printf ("Environment variable PORT not set; using internal port value -> %s" , cfg .Server .ExternalPort )
106107 }
107108
108109 return cfg
You can’t perform that action at this time.
0 commit comments