diff --git a/internal/config/config.go b/internal/config/config.go index 47bc15a..fbe137f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -71,8 +71,10 @@ type ProjectCatchUp struct { } type HTTP struct { - Host string `default:"127.0.0.1" yaml:"host"` - Port string `default:"8080" yaml:"port"` + Enabled bool `default:"true" yaml:"enabled"` + Host string `default:"127.0.0.1" yaml:"host"` + Port string `default:"9100" yaml:"port"` + Debug bool `default:"false" yaml:"debug"` } type Log struct { diff --git a/internal/config/parser.go b/internal/config/parser.go index 9c6c23a..9ce9ba5 100644 --- a/internal/config/parser.go +++ b/internal/config/parser.go @@ -18,7 +18,7 @@ func (c *Config) UnmarshalYAML(v *yaml.Node) error { Projects []yaml.Node `yaml:"projects"` - HTTP HTTP `yaml:"server"` + HTTP HTTP `yaml:"http"` Log Log `yaml:"log"` } diff --git a/test/config/config_test.go b/test/config/config_test.go index 92d9db0..6a58a50 100644 --- a/test/config/config_test.go +++ b/test/config/config_test.go @@ -19,8 +19,10 @@ func defaultConfig() config.Config { cfg.Projects = []config.Project{} + cfg.HTTP.Enabled = true cfg.HTTP.Host = "127.0.0.1" - cfg.HTTP.Port = "8080" + cfg.HTTP.Port = "9100" + cfg.HTTP.Debug = false cfg.Log.Level = "info" cfg.Log.Format = "text"