From 492aadd585effde45dee166b7172132721d49850 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 11:37:58 +1000 Subject: [PATCH] Add asset handling --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index a784b47..f1accab 100644 --- a/main.go +++ b/main.go @@ -220,6 +220,9 @@ func main() { router.HandleFunc("/save/{output}", saveHandler) router.HandleFunc("/del/{pasteId}/{delKey}", delHandler) router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/")))) + router.PathPrefix("/css").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/css/")))) + router.PathPrefix("/js").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/js/")))) + router.PathPrefix("/fonts").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/fonts/")))) err := http.ListenAndServe(PORT, router) if err != nil { log.Fatal(err)