diff options
Diffstat (limited to 'app/main.go')
| -rw-r--r-- | app/main.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/main.go b/app/main.go index 0a8b7dd..ac2f27b 100644 --- a/app/main.go +++ b/app/main.go @@ -9,14 +9,16 @@ import ( var decoder = schema.NewDecoder() -//var mainTempl = template.Must(template.New("global").ParseFiles("templates/header.html", "templates/navbar.html", "templates/footer.html")) -var mainTempl = template.Must(template.New("global").ParseGlob("../templates/*.html")) +var mainTempl = template.Must(template.New("global").ParseGlob("../views/*.html")) func main() { + run() InitDB() 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") |
