I use github.com/gorilla/mux router and I need include my static files for all routes or notFound routes. Now refreshing only page by /
works but other urls doesn't.
package main
import (
"fmt"
"log"
"net/http"
"crudgo/backend/home"
"github.com/gorilla/mux"
)
func main() {
http.FileServer(http.Dir("./public/p/dist"))
log.Println("Listening...")
router := mux.NewRouter();
home.HomeRoute(router)
router.PathPrefix("/{_:.*}").Handler(http.FileServer(http.Dir("./public/p/dist")))
http.ListenAndServe("localhost:3000", router)
}