diff --git a/cli/cmd/root.go b/cli/cmd/root.go index 90b206d0..c815dab6 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -15,6 +15,7 @@ import ( "github.com/spf13/cobra" "net/http" "os" + "strings" ) var configPath string @@ -48,6 +49,12 @@ func runService() { util.Config.PrintDbInfo() + port := util.Config.Port + + if !strings.HasPrefix(port, ":") { + port = ":" + port + } + fmt.Printf("Tmp Path (projects home) %v\n", util.Config.TmpPath) fmt.Printf("Semaphore %v\n", util.Version) fmt.Printf("Interface %v\n", util.Config.Interface) @@ -81,7 +88,7 @@ func runService() { store.Close("root") } - err := http.ListenAndServe(util.Config.Interface+util.Config.Port, cropTrailingSlashMiddleware(router)) + err := http.ListenAndServe(util.Config.Interface+port, cropTrailingSlashMiddleware(router)) if err != nil { log.Panic(err)