aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.go b/main.go
index ba441fe..55f866e 100644
--- a/main.go
+++ b/main.go
@@ -12,6 +12,7 @@ import (
"git.gabrielgio.me/cerrado/pkg/config"
"git.gabrielgio.me/cerrado/pkg/worker"
+ "git.gabrielgio.me/cerrado/templates"
)
func main() {
@@ -51,10 +52,11 @@ func run(ctx context.Context) error {
return
}
- if _, err := w.Write(b); err != nil {
- slog.Error("Error handling index", "error", err)
- return
+ hello := &templates.HelloPage{
+ Body: string(b),
}
+
+ templates.WritePageTemplate(w, hello)
})
serverTask := worker.NewServerTask(&http.Server{Handler: mux, Addr: "0.0.0.0:8080"})