Serve assets

This commit is contained in:
Martin Polden 2012-11-21 22:52:51 +01:00
parent 98e914c608
commit f1d987d8f9

View File

@ -51,6 +51,8 @@ func handler(w http.ResponseWriter, req *http.Request) {
} }
func main() { func main() {
http.Handle("/assets/", http.StripPrefix("/assets/",
http.FileServer(http.Dir("assets/"))))
http.HandleFunc("/", handler) http.HandleFunc("/", handler)
err := http.ListenAndServe(":8080", nil) err := http.ListenAndServe(":8080", nil)
if err != nil { if err != nil {