diff --git a/cmd/start.go b/cmd/start.go index 5d584157..4404b771 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -148,7 +148,7 @@ var startCmd = &cobra.Command{ } root, _ := adminRoot() - endpoints := []setup.Endpoint{{URL: fmt.Sprintf("http://%s:%s", "127.0.0.1", port), Interface: "localhost"}} + endpoints := []setup.Endpoint{{URL: fmt.Sprintf("http://%s%s", "127.0.0.1", port), Interface: "localhost"}} switch host { case "0.0.0.0": // All interfaces diff --git a/setup/setup.go b/setup/setup.go index df9ec11a..4bcf0cda 100644 --- a/setup/setup.go +++ b/setup/setup.go @@ -18,8 +18,12 @@ func Endpoints(cfg config.Config) ([]Endpoint, error) { var endpoints []Endpoint for _, network := range networks { + port := fmt.Sprintf(":%d", cfg.Port) + if port == ":80" { + port = "" + } endpoint := Endpoint{ - URL: fmt.Sprintf("http://%s:%d", network.IPv4, cfg.Port), + URL: fmt.Sprintf("http://%s%s", network.IPv4, port), Interface: network.Interface, } endpoints = append(endpoints, endpoint)