summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorHorus32015-02-19 00:03:18 +0100
committerHorus32015-02-19 00:03:18 +0100
commit58e63343703e0c3f3c12934e62fc0f4575761869 (patch)
treec60acb1bb97cdd47a6c7ee1c5a2e38d50f0f84c4 /main.go
parentc6260f34b931bdda82d3dab256f4420caa1a45aa (diff)
parentcb5f3037bb18403433c2cfd0271f6bea76906aca (diff)
downloadstatuspage-58e63343703e0c3f3c12934e62fc0f4575761869.tar.gz
Merged.
Diffstat (limited to 'main.go')
-rw-r--r--main.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..fcbeaf5
--- /dev/null
+++ b/main.go
@@ -0,0 +1,25 @@
+package main
+
+import (
+ "github.com/gorilla/mux"
+ "github.com/gorilla/schema"
+ //"html/template"
+ "net/http"
+)
+
+var decoder = schema.NewDecoder()
+
+//var templ = template.Must(template.ParseFiles("templates/header.html", "templates/navbar.html", "templates/footer.html"))
+
+func main() {
+ InitDB()
+
+ r := mux.NewRouter()
+ r.HandleFunc("/", IndexHandler)
+ r.HandleFunc("/register", RegisterHandler).Methods("POST")
+ r.HandleFunc("/register", PrintRegisterHandler).Methods("GET")
+ r.HandleFunc("/new", AddNewJobHandler).Methods("POST")
+ r.HandleFunc("/new", PrintNewJobHandler).Methods("GET")
+ http.Handle("/", r)
+ http.ListenAndServe(":8080", nil)
+}