diff --git a/server.go b/server.go index 1b9342a..af32979 100644 --- a/server.go +++ b/server.go @@ -65,12 +65,12 @@ func main() { http.HandleFunc("/", pageHandler(mainHandler)) http.HandleFunc("/r/", pageHandler(threadHandler)) + // Serve static files, in production use cdn.rawgit.com (nvm fuck this, always serve static) + fs := http.FileServer(http.Dir("static")) + http.Handle("/static/", http.StripPrefix("/static/", fs)) + // Run locally for debugging/testing if debugMode { - // Serve static files, in production use cdn.rawgit.com - fs := http.FileServer(http.Dir("static")) - http.Handle("/static/", http.StripPrefix("/static/", fs)) - fmt.Println("Starting server on http://localhost:8080") if err := http.ListenAndServe(":8080", nil); err != nil { diff --git a/static/loading.gif b/static/loading.gif index 6fd942d..a25bd09 100644 Binary files a/static/loading.gif and b/static/loading.gif differ diff --git a/templates/header.html b/templates/header.html index d56abfe..ca87d17 100644 --- a/templates/header.html +++ b/templates/header.html @@ -3,9 +3,8 @@