summary refs log tree commit diff stats
path: root/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'handlers.go')
-rw-r--r--handlers.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/handlers.go b/handlers.go
index 3b23761..961ac4f 100644
--- a/handlers.go
+++ b/handlers.go
@@ -15,9 +15,11 @@ import (
 // handles "/"
 func indexHandler(w http.ResponseWriter, _ *http.Request) {
 	w.Header().Set("Content-Type", htmlutf8)
-	n, err := w.Write([]byte("getwtxt v" + getwtxt))
-	if err != nil || n == 0 {
-		log.Printf("Error writing to HTTP stream: %v bytes,  %v\n", n, err)
+	err := tmpls.ExecuteTemplate(w, "index.html", confObj.Instance)
+	if err != nil {
+		log.Printf("Error writing to HTTP stream: %v\n", err)
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
 	}
 
 }