| 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "net/http" |
| 5 | |
| 6 | "github.com/stevedylandev/andromeda/pkg/darkmatter" |
| 7 | "github.com/stevedylandev/andromeda/pkg/web" |
| 8 | ) |
| 9 | |
| 10 | func (a *App) routes() *http.ServeMux { |
| 11 | mux := http.NewServeMux() |
| 12 | mux.HandleFunc("GET /", a.indexHandler) |
| 13 | mux.HandleFunc("POST /check", a.checkHandler) |
| 14 | mux.HandleFunc("GET /static/", web.EmbeddedHandler(appFS, "static")) |
| 15 | darkmatter.Mount(mux, "/assets") |
| 16 | return mux |
| 17 | } |