+1
-1
cmd/main.go
+1
-1
cmd/main.go
+6
internal/app/app.go
+6
internal/app/app.go
···
2
3
import (
4
"database/sql"
5
+
"fmt"
6
"log/slog"
7
"net/http"
8
"time"
···
33
IdleTimeout: 30 * time.Second,
34
Handler: router,
35
}
36
+
37
+
router.HandleFunc("/healthcheck", func(w http.ResponseWriter, r *http.Request) {
38
+
w.WriteHeader(http.StatusOK);
39
+
fmt.Fprintf(w, "reporting for duty")
40
+
})
41
42
s.logger.Info("app server started")
43
return server.ListenAndServe()