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 {
93
93
}
94
94
95
95
cfg , err := ParseConfig (v )
96
+ if err != nil {
97
+ log .Fatalf ("Error in parse config %v" , err )
98
+ }
99
+
96
100
envPort := os .Getenv ("PORT" )
97
101
if envPort != "" {
98
102
cfg .Server .ExternalPort = envPort
99
103
log .Printf ("Set external port from environment -> %s" , cfg .Server .ExternalPort )
100
104
} else {
101
105
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 )
106
107
}
107
108
108
109
return cfg
You can’t perform that action at this time.
0 commit comments