diff --git a/README.md b/README.md index d25b2c685..ff6789fc4 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,10 @@ HTTP port to listen on. Example: PORT=8000 +This option can also be set using `-port` flag. Example: + + $ unsee -port 8000 + Default is `8080`. #### SENTRY_DSN diff --git a/config/config.go b/config/config.go index bf08dee4a..82d657f0f 100644 --- a/config/config.go +++ b/config/config.go @@ -30,6 +30,7 @@ type configEnvs struct { Debug bool `envconfig:"DEBUG" default:"false" help:"Enable debug mode"` FilterDefault string `envconfig:"FILTER_DEFAULT" help:"Default filter string"` JiraRegexp spaceSeparatedList `envconfig:"JIRA_REGEX" help:"List of JIRA regex rules"` + Port int `envconfig:"PORT" default:"8080" help:"HTTP port to listen on"` SentryDSN string `envconfig:"SENTRY_DSN" help:"Sentry DSN for Go exceptions"` SentryPublicDSN string `envconfig:"SENTRY_PUBLIC_DSN" help:"Sentry DSN for javascript exceptions"` StripLabels spaceSeparatedList `envconfig:"STRIP_LABELS" help:"List of labels to ignore"`