From 073dd984dcf552b797c3b542a17a810c64683f03 Mon Sep 17 00:00:00 2001 From: William King Date: Mon, 16 Dec 2013 00:37:09 -0800 Subject: [PATCH] If baseurl is set then print that on the command line, else leave as default of localhost --- commands/server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/server.go b/commands/server.go index a93311759..4d76d2e9b 100644 --- a/commands/server.go +++ b/commands/server.go @@ -64,7 +64,11 @@ func serve(port int) { fmt.Println("Serving pages from " + Config.GetAbsPath(Config.PublishDir)) } - fmt.Printf("Web Server is available at http://localhost:%v\n", port) + if BaseUrl == "" { + fmt.Printf("Web Server is available at %s\n", Config.BaseUrl) + } else { + fmt.Printf("Web Server is available at http://localhost:%v\n", port) + } fmt.Println("Press ctrl+c to stop") panic(http.ListenAndServe(":"+strconv.Itoa(port), http.FileServer(http.Dir(Config.GetAbsPath(Config.PublishDir))))) }