server defaults to localhost unless overridden by command line flags
authorspf13 <steve.francia@gmail.com>
Fri, 4 Oct 2013 20:03:13 +0000 (16:03 -0400)
committerspf13 <steve.francia@gmail.com>
Fri, 4 Oct 2013 20:03:13 +0000 (16:03 -0400)
commands/server.go

index b4d37d3e631a6604aa37531d86c108103e92c9a0..d82a345f5ac613a57ec04b54b8caa3ea333a406c 100644 (file)
@@ -40,7 +40,8 @@ Serve them up.`,
 func server(cmd *cobra.Command, args []string) {
        InitializeConfig()
 
-       if Config.BaseUrl == "" {
+       // Unless command line overrides, we use localhost for the server
+       if BaseUrl == "" {
                Config.BaseUrl = "http://localhost:" + strconv.Itoa(serverPort)
        }