Fix asset paths
parent
4d42d381b4
commit
0f113002ad
8
main.go
8
main.go
|
@ -28,11 +28,13 @@ func main() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
http.Handle("/js/", http.FileServer(http.Dir(".")))
|
http.Handle("/js/", http.FileServer(http.Dir("assets")))
|
||||||
http.Handle("/css/", http.FileServer(http.Dir(".")))
|
http.Handle("/css/", http.FileServer(http.Dir("assets")))
|
||||||
http.Handle("/favicon.ico", http.FileServer(http.Dir(".")))
|
http.Handle("/favicon.ico", http.FileServer(http.Dir("assets")))
|
||||||
|
http.Handle("/data", http.FileServer(http.Dir("data")))
|
||||||
http.HandleFunc("/", index)
|
http.HandleFunc("/", index)
|
||||||
|
|
||||||
|
log.Printf("Listening on %v", server.Addr)
|
||||||
err = server.ListenAndServe()
|
err = server.ListenAndServe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
Loading…
Reference in New Issue