From 9fd1b6a54c77f78df1031a620fe3fb3887eda56d Mon Sep 17 00:00:00 2001 From: Horus3 Date: Thu, 19 Feb 2015 16:55:23 +0100 Subject: Add health check. --- app/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/main.go') diff --git a/app/main.go b/app/main.go index ac2f27b..35a162a 100644 --- a/app/main.go +++ b/app/main.go @@ -3,6 +3,7 @@ package main import ( "github.com/gorilla/mux" "github.com/gorilla/schema" + "github.com/robfig/cron" "html/template" "net/http" ) @@ -11,6 +12,8 @@ var decoder = schema.NewDecoder() var mainTempl = template.Must(template.New("global").ParseGlob("../views/*.html")) +var c = cron.New() + func main() { run() InitDB() @@ -23,6 +26,7 @@ func main() { 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) http.ListenAndServe(":8080", nil) } -- cgit v1.2.3