From: spf13 Date: Fri, 4 Oct 2013 20:03:13 +0000 (-0400) Subject: server defaults to localhost unless overridden by command line flags X-Git-Tag: v0.9~73 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=be7ba0e98f5ea5debcd34288224f57c360c63dd0;p=brevno-suite%2Fhugo server defaults to localhost unless overridden by command line flags --- diff --git a/commands/server.go b/commands/server.go index b4d37d3e..d82a345f 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) }