Converting pages to templates
This commit is contained in:
@ -34,7 +34,7 @@ func main() {
|
||||
|
||||
tc, err := render.CreateTemplateCache()
|
||||
if err != nil {
|
||||
log.Fatal("cannot create template cache")
|
||||
log.Fatalf("cannot create template cache: %s", err)
|
||||
}
|
||||
app.TemplateCahce = tc
|
||||
app.UseCache = false
|
||||
|
@ -19,6 +19,11 @@ func routes(app *config.AppConfig) http.Handler {
|
||||
|
||||
mux.Get("/", handlers.Repo.Home)
|
||||
mux.Get("/about", handlers.Repo.About)
|
||||
mux.Get("/contact", handlers.Repo.Contact)
|
||||
mux.Get("/generals-quarters", handlers.Repo.Generals)
|
||||
mux.Get("/majors-suite", handlers.Repo.Majors)
|
||||
mux.Get("/reservation", handlers.Repo.Reservation)
|
||||
mux.Get("/make-reservation", handlers.Repo.MakeReservation)
|
||||
|
||||
fileServer := http.FileServer(http.Dir("./static/"))
|
||||
mux.Handle("/static/*", http.StripPrefix("/static", fileServer))
|
||||
|
Reference in New Issue
Block a user