diff options
Diffstat (limited to 'app/main.go')
| -rw-r--r-- | app/main.go | 4 |
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) } |
