mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-20 10:53:48 +00:00
adding more verbose output to server functionality
This commit is contained in:
parent
b2385f062a
commit
c560a7537a
1 changed files with 5 additions and 0 deletions
5
main.go
5
main.go
|
@ -112,6 +112,11 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func serve(port string, config *hugolib.Config) {
|
func serve(port string, config *hugolib.Config) {
|
||||||
|
|
||||||
|
if config.Verbose {
|
||||||
|
fmt.Println("Serving pages from " + config.GetAbsPath(config.PublishDir))
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("Web Server is available at http://localhost:" + port)
|
fmt.Println("Web Server is available at http://localhost:" + port)
|
||||||
fmt.Println("Press ctrl+c to stop")
|
fmt.Println("Press ctrl+c to stop")
|
||||||
panic(http.ListenAndServe(":"+port, http.FileServer(http.Dir(config.PublishDir))))
|
panic(http.ListenAndServe(":"+port, http.FileServer(http.Dir(config.PublishDir))))
|
||||||
|
|
Loading…
Reference in a new issue