If baseurl is set then print that on the command line, else leave as default of localhost
authorWilliam King <william.king@quentustech.com>
Mon, 16 Dec 2013 08:37:09 +0000 (00:37 -0800)
committerspf13 <steve.francia@gmail.com>
Sat, 28 Dec 2013 19:02:10 +0000 (14:02 -0500)
Conflicts:
commands/server.go

commands/server.go

index 73f23609a5745fa9b89aa3271da5b88047c8207b..b3d026421efc5bfdae484e1b2862c78e77e0a26f 100644 (file)
@@ -70,7 +70,12 @@ func serve(port int) {
                fmt.Println("Serving pages from " + Config.GetAbsPath(Config.PublishDir))
        }
 
-       fmt.Printf("Web server is available at %s\n", Config.BaseUrl)
+       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)))))
 }