Health Check

This commit is contained in:
2025-03-11 17:07:57 +02:00
parent d324deef96
commit 462aa75b22
2 changed files with 10 additions and 1 deletions

11
main.go
View File

@@ -4,10 +4,19 @@ import (
"net/http" "net/http"
) )
func readinessHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
}
func main() { func main() {
mux := http.NewServeMux() mux := http.NewServeMux()
mux.Handle("/", http.FileServer(http.Dir("./public"))) mux.HandleFunc("/healthz", readinessHandler)
fileServer := http.FileServer(http.Dir("./public"))
mux.Handle("/app/", http.StripPrefix("/app", fileServer))
server := &http.Server{ server := &http.Server{
Addr: ":8080", Addr: ":8080",

BIN
public/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB