diff options
| author | Horus3 | 2015-02-21 14:50:00 +0100 |
|---|---|---|
| committer | Horus3 | 2015-02-21 14:50:00 +0100 |
| commit | b58e21a525e7e4aeda3ec51bfcb07390af8be465 (patch) | |
| tree | 9974d885ae2c81052e881e00207677e80d9f6fc7 /app/main.go | |
| parent | c92989a8fc738094b205094a1bdd458a40c23d9c (diff) | |
| download | statuspage-b58e21a525e7e4aeda3ec51bfcb07390af8be465.tar.gz | |
Index page is now cached.
Diffstat (limited to 'app/main.go')
| -rw-r--r-- | app/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
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) } |
