Complete addition of GET option. Build container.

This commit is contained in:
Fred Boniface
2023-09-08 11:43:22 +01:00
parent 99a1a25254
commit 9007e7e916
4 changed files with 5 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
templatePath := "templates" + path + ".html"
if _, err := os.Stat(templatePath); err == nil {
tmpl, err := template.ParseFiles("templates/base.html", templatePath)
tmpl, err := template.ParseFiles("./templates/base.html", "./"+templatePath)
if err != nil {
fmt.Println("Error parsing template: ", err)
http.Error(w, "Error parsing template", http.StatusInternalServerError)