diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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"}) |