Don't use the default mux for handling requests
This commit is contained in:
parent
fc0834ea4c
commit
bde582ad4b
|
@ -69,10 +69,9 @@ func main() {
|
|||
mux.Handle("/teams/", StaticHandler(staticDir))
|
||||
mux.Handle("/themes/", StaticHandler(staticDir))
|
||||
mux.Handle("/", http.FileServer(http.Dir(staticDir)))
|
||||
http.HandleFunc("/", mux.ServeHTTP)
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue