summaryrefslogtreecommitdiff
path: root/app/main.go
diff options
context:
space:
mode:
authorHorus32015-02-19 16:55:23 +0100
committerHorus32015-02-19 16:55:23 +0100
commit9fd1b6a54c77f78df1031a620fe3fb3887eda56d (patch)
treea22686f2eac23c7a47e9ccd9aa3962aa80a5bf64 /app/main.go
parent5da13e75c013688f4fda1e57a5b3968332caa760 (diff)
downloadstatuspage-9fd1b6a54c77f78df1031a620fe3fb3887eda56d.tar.gz
Add health check.
Diffstat (limited to 'app/main.go')
-rw-r--r--app/main.go4
1 files changed, 4 insertions, 0 deletions
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)
}