mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +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) {
|
func server(cmd *cobra.Command, args []string) {
|
||||||
InitializeConfig()
|
InitializeConfig()
|
||||||
|
|
||||||
if Config.BaseUrl == "" {
|
// Unless command line overrides, we use localhost for the server
|
||||||
|
if BaseUrl == "" {
|
||||||
Config.BaseUrl = "http://localhost:" + strconv.Itoa(serverPort)
|
Config.BaseUrl = "http://localhost:" + strconv.Itoa(serverPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user