1
0
Fork 0

Fix asset paths

main
Ambrose Chua 2020-11-07 23:38:47 +08:00
parent 4d42d381b4
commit 0f113002ad
1 changed files with 5 additions and 3 deletions

View File

@ -28,11 +28,13 @@ func main() {
panic(err)
}
http.Handle("/js/", http.FileServer(http.Dir(".")))
http.Handle("/css/", http.FileServer(http.Dir(".")))
http.Handle("/favicon.ico", http.FileServer(http.Dir(".")))
http.Handle("/js/", http.FileServer(http.Dir("assets")))
http.Handle("/css/", http.FileServer(http.Dir("assets")))
http.Handle("/favicon.ico", http.FileServer(http.Dir("assets")))
http.Handle("/data", http.FileServer(http.Dir("data")))
http.HandleFunc("/", index)
log.Printf("Listening on %v", server.Addr)
err = server.ListenAndServe()
if err != nil {
panic(err)