package app import ( "net/http" "github.com/xlgmokha/x/pkg/ioc" "gitlab.com/mokhax/sparkled/app/controllers/health" "gitlab.com/mokhax/sparkled/app/controllers/sparkles" "gitlab.com/mokhax/sparkled/pkg/db" "gitlab.com/mokhax/sparkled/pkg/web" ) func New() http.Handler { mux := ioc.MustResolve[*http.ServeMux](ioc.Default) mountable := []web.Mountable{ sparkles.New(ioc.MustResolve[db.Repository](ioc.Default)), health.New(), } for _, m := range mountable { m.MountTo(mux) } mux.Handle("GET /", http.FileServer(http.Dir("public"))) return mux }