Skip to content

Commit

Permalink
fix: changed name of environment variable for service port to avoid c…
Browse files Browse the repository at this point in the history
…onflicts (#18)
  • Loading branch information
FrancescoL96 authored Oct 15, 2024
1 parent c24b1c9 commit ea4208d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/helpers/configuration/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ type Configuration struct {
}

func (c *Configuration) Default() {
c.WebServicePort = 8084
c.WebServicePort = 8085
c.DebugLevel = zerolog.DebugLevel
}

func ParseConfig() (Configuration, error) {
port, err := strconv.Atoi(os.Getenv("RESOURCE_TREE_HANDLER_PORT"))
port, err := strconv.Atoi(os.Getenv("RESOURCE_TREE_HANDLER_API_PORT"))
if err != nil {
return Configuration{}, err
}
Expand All @@ -44,7 +44,7 @@ func ParseConfig() (Configuration, error) {
case "error":
return Configuration{WebServicePort: port, DebugLevel: zerolog.ErrorLevel}, nil
}
return Configuration{WebServicePort: port, DebugLevel: zerolog.DebugLevel}, nil
return Configuration{WebServicePort: port, DebugLevel: zerolog.InfoLevel}, nil
}

// func ParseConfigFile(ctx context.Context, rc *rest.Config, filePath string) (Configuration, error) {
Expand Down

0 comments on commit ea4208d

Please sign in to comment.