Skip to content

Commit

Permalink
fix: $LISTEN instead of $PORT
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Jul 31, 2021
1 parent 54d3554 commit acbd79d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Config struct {
GitHubTokens []string `env:"GITHUB_TOKENS"`
GitHubPageSize int `env:"GITHUB_PAGE_SIZE" envDefault:"100"`
GitHubMaxRateUsagePct int `env:"GITHUB_MAX_RATE_LIMIT_USAGE" envDefault:"80"`
Port string `env:"PORT" envDefault:"3000"`
Listen string `env:"LISTEN" envDefault:"127.0.0.1:3000"`
}

// Get the current Config.
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ func main() {
),
),
),
Addr: "127.0.0.1:" + config.Port,
WriteTimeout: 30 * time.Second,
ReadTimeout: 30 * time.Second,
Addr: config.Listen,
WriteTimeout: 60 * time.Second,
ReadTimeout: 60 * time.Second,
}
ctx.Info("starting up...")
ctx.WithError(srv.ListenAndServe()).Error("failed to start up server")
Expand Down

0 comments on commit acbd79d

Please sign in to comment.