|
|
@ -34,6 +34,11 @@ func sendClient() error { |
|
|
fmt.Printf("Server address: %s\n", url) |
|
|
fmt.Printf("Server address: %s\n", url) |
|
|
|
|
|
|
|
|
http.HandleFunc("/", handler.SendHandler) |
|
|
http.HandleFunc("/", handler.SendHandler) |
|
|
|
|
|
// ico
|
|
|
|
|
|
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
w.Header().Set("Content-Type", "image/x-icon") |
|
|
|
|
|
http.ServeFile(w, r, "./favicon.ico") |
|
|
|
|
|
}) |
|
|
// 加载静态资源
|
|
|
// 加载静态资源
|
|
|
http.Handle("/static/", http.StripPrefix("/static/", |
|
|
http.Handle("/static/", http.StripPrefix("/static/", |
|
|
http.FileServer(http.FS(web.StaticFs)))) |
|
|
http.FileServer(http.FS(web.StaticFs)))) |
|
|
|