Initial commit

This commit is contained in:
mathias
2026-07-19 08:29:23 +00:00
commit 25ad154eac
23 changed files with 747 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package main
import (
"log/slog"
"net/http"
"os"
"__MODULE_PATH__/internal/web"
)
func main() {
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
mux := http.NewServeMux()
mux.HandleFunc("/healthz", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte("ok"))
})
mux.Handle("/", web.NewHandler())
addr := ":8080"
logger.Info("__PROJECT_NAME__ starting", "addr", addr)
if err := http.ListenAndServe(addr, mux); err != nil {
logger.Error("server stopped", "err", err)
os.Exit(1)
}
}