I don't understand why my static resources aren't being served. Here is the code:
func main() {
http.HandleFunc("/", get_shows)
http.HandleFunc("/get", get_show_json)
http.HandleFunc("/set", set_shows)
http.Handle("/css/", http.FileServer(http.Dir("./css")))
http.Handle("/js/", http.FileServer(http.Dir("./js")))
http.ListenAndServe(":8080", nil)
}
When I run the program, navigating to http://myhost.fake/css/ or to http://myhost.fake/css/main.css (these exists in the filesystem), I get a 404 error. The same is true if I replace "./css" with the full path to the directory. Ditto for the js static directory. My other handlers work fine. I am on a linux. Thanks!