Flow now works

This commit is contained in:
2024-11-17 20:40:50 +01:00
parent 157896d5d7
commit 6ae65e9169
8 changed files with 144 additions and 276 deletions

View File

@@ -1,6 +1,8 @@
package controllers
import (
"fmt"
"html"
"html/template"
"log"
"net/http"
@@ -9,6 +11,13 @@ import (
)
func Index(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
w.WriteHeader(http.StatusNotFound)
fmt.Fprintf(w, "Error: 404 %s not found.", html.EscapeString(r.URL.Path))
return
}
lp := filepath.Join("application", "layouts", "main.html")
fp := filepath.Join("application", "views", "index.html")