From be7ba0e98f5ea5debcd34288224f57c360c63dd0 Mon Sep 17 00:00:00 2001 From: spf13 Date: Fri, 4 Oct 2013 16:03:13 -0400 Subject: [PATCH] server defaults to localhost unless overridden by command line flags --- commands/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/server.go b/commands/server.go index b4d37d3e6..d82a345f5 100644 --- a/commands/server.go +++ b/commands/server.go @@ -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) }