Don't use the default mux for handling requests
This commit is contained in:
parent
fc0834ea4c
commit
bde582ad4b
1 changed files with 1 additions and 2 deletions
|
@ -69,10 +69,9 @@ func main() {
|
||||||
mux.Handle("/teams/", StaticHandler(staticDir))
|
mux.Handle("/teams/", StaticHandler(staticDir))
|
||||||
mux.Handle("/themes/", StaticHandler(staticDir))
|
mux.Handle("/themes/", StaticHandler(staticDir))
|
||||||
mux.Handle("/", http.FileServer(http.Dir(staticDir)))
|
mux.Handle("/", http.FileServer(http.Dir(staticDir)))
|
||||||
http.HandleFunc("/", mux.ServeHTTP)
|
|
||||||
|
|
||||||
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
|
log.Println(fmt.Sprintf("Ready, listening on %s", *bind))
|
||||||
if err := http.ListenAndServe(*bind, nil); err != nil {
|
if err := http.ListenAndServe(*bind, mux); err != nil {
|
||||||
log.Fatal("Unable to listen and serve: ", err)
|
log.Fatal("Unable to listen and serve: ", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue