Skip to content

Commit

Permalink
cmd: verify http server url before starting the daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Dec 9, 2022
1 parent 716029b commit 9c630ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func Main() {
if err := yaml.Unmarshal(file, &config); err != nil {
return errors.Wrapf(err, "Fail to read the yaml config file")
}
if config.HTTP.Host == "" {
return errors.New("Invalid HTTP server configuration")
}
zapConfig := zap.NewProductionConfig()
if c.Bool("debug") {
zapConfig.Level.SetLevel(zap.DebugLevel)
Expand Down

0 comments on commit 9c630ae

Please sign in to comment.