Skip to content

Commit

Permalink
Start server on 0.0.0.0 by default
Browse files Browse the repository at this point in the history
This starts the server on 0.0.0.0 by default so that it can accept
incomming connections.
  • Loading branch information
alistairjudson committed Apr 8, 2021
1 parent b6c701c commit 69b3f46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// nolint: gomnd
var Service = dependency.Service{
ConfigFunc: func(flags dependency.FlagSet) {
flags.String("server-host", "127.0.0.1", "The IP to start on")
flags.String("server-host", "0.0.0.0", "The IP to start on")
flags.Int("server-port", 8080, "The port to start the web Server on")
flags.Duration("read-timeout", 10*time.Second, "The read timeout for the HTTP Server")
flags.Duration("read-header-timeout", 20*time.Second, "The read header timeout for the HTTP Server")
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestNew(t *testing.T) {
t.Logf(format, args...)
})
expectedServer := &http.Server{
Addr: "127.0.0.1:8080",
Addr: "0.0.0.0:8080",
Handler: handler,
ReadTimeout: 10 * time.Second,
ReadHeaderTimeout: 20 * time.Second,
Expand Down

0 comments on commit 69b3f46

Please sign in to comment.