From b58e21a525e7e4aeda3ec51bfcb07390af8be465 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sat, 21 Feb 2015 14:50:00 +0100 Subject: Index page is now cached. --- app/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/main.go') diff --git a/app/main.go b/app/main.go index 3850a4d..d51cf20 100644 --- a/app/main.go +++ b/app/main.go @@ -23,15 +23,17 @@ func main() { r := mux.NewRouter() r.HandleFunc("/", IndexHandler) - //r.HandleFunc("/static", StaticHandler) r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("./../static")))) r.HandleFunc("/register", RegisterHandler).Methods("POST") r.HandleFunc("/register", PrintRegisterHandler).Methods("GET") r.HandleFunc("/new", AddNewJobHandler).Methods("POST") r.HandleFunc("/new", PrintNewJobHandler).Methods("GET") r.HandleFunc("/jobs", ShowJobHandler) + http.Handle("/", r) + ip := os.Getenv("STATUS_HTTP_IP") port := os.Getenv("STATUS_HTTP_PORT") + http.ListenAndServe(ip+":"+port, nil) } -- cgit v1.2.3