Initialized proper project structure

This commit is contained in:
Robin Dittmar
2026-07-03 11:39:58 +02:00
parent d98e8e9244
commit 5325e04a30
9 changed files with 159 additions and 52 deletions
+22
View File
@@ -0,0 +1,22 @@
package router
import (
"net/http"
"github.com/robindittmar/dttmr-api/internal/api/handler"
"github.com/robindittmar/dttmr-api/internal/api/middleware"
)
type Config struct{}
func NewMux(cfg Config) http.Handler {
mux := http.NewServeMux()
mux.HandleFunc("/", handler.DefaultHandler)
mux.HandleFunc("GET /health", handler.HealthHandler)
var httpHandler http.Handler = mux
httpHandler = middleware.WithTelemetry(httpHandler)
return httpHandler
}