diff --git a/serve.go b/serve.go index 6c6e5da8..8a7d22ca 100644 --- a/serve.go +++ b/serve.go @@ -51,6 +51,24 @@ import ( "github.com/micromdm/micromdm/queue" ) +const homePage = ` + + + + MicroMDM + + + +

Welcome to MicroMDM!

+

Enroll a device

+ + +` + const configDBPath = "/var/db/micromdm" func serve(args []string) error { @@ -167,6 +185,9 @@ func serve(args []string) error { r.Handle("/scep", scepHandler) r.Handle("/push/{udid}", pushHandlers.PushHandler) r.Handle("/v1/commands", commandHandlers.NewCommandHandler).Methods("POST") + r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, homePage) + }) if *flRepoPath != "" { r.PathPrefix("/repo/").Handler(http.StripPrefix("/repo/", http.FileServer(http.Dir(*flRepoPath))))