mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
server defaults to localhost unless overridden by command line flags
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user