+1
-1
cmd/main.go
+1
-1
cmd/main.go
+6
internal/app/app.go
+6
internal/app/app.go
···
2
2
3
3
import (
4
4
"database/sql"
5
+
"fmt"
5
6
"log/slog"
6
7
"net/http"
7
8
"time"
···
32
33
IdleTimeout: 30 * time.Second,
33
34
Handler: router,
34
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
+
})
35
41
36
42
s.logger.Info("app server started")
37
43
return server.ListenAndServe()