feat: add search functionality

This commit is contained in:
rramiachraf 2023-03-09 17:11:37 +01:00
parent b7c91e7f1b
commit dd0ee8723b
8 changed files with 198 additions and 6 deletions

View file

@ -27,6 +27,7 @@ func main() {
r.Use(securityHeaders)
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { render("home", w, nil) })
r.HandleFunc("/search", searchHandler).Methods("GET")
r.HandleFunc("/{id}-lyrics", lyricsHandler)
r.HandleFunc("/images/{filename}.{ext}", proxyHandler)
r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))