This commit is contained in:
@@ -48,18 +48,7 @@ func (a *App) Router() http.Handler {
|
||||
return requestID(logging(a.mux))
|
||||
}
|
||||
|
||||
func (a *App) routes() {
|
||||
// Static
|
||||
fs := http.FileServer(http.Dir(a.cfg.StaticDir))
|
||||
a.mux.Handle("/static/", http.StripPrefix("/static/", fs))
|
||||
|
||||
// Core pages
|
||||
a.mux.HandleFunc("/", a.handleDashboard)
|
||||
|
||||
// Health & metrics
|
||||
a.mux.HandleFunc("/healthz", a.handleHealthz)
|
||||
a.mux.HandleFunc("/metrics", a.handleMetrics)
|
||||
}
|
||||
// routes() is now in routes.go
|
||||
|
||||
func parseTemplates(dir string) (*template.Template, error) {
|
||||
pattern := filepath.Join(dir, "*.html")
|
||||
|
||||
Reference in New Issue
Block a user