mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 19:01:23 +00:00
server defaults to localhost unless overridden by command line flags
This commit is contained in:
parent
266f583a8c
commit
be7ba0e98f
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue