Re: [go-nuts] Re: Gorilla toolkit - mux with http.FileServer returning 404

2023-03-22 Thread Marvin Renich
* zhiwei dong [230322 00:47]: > The 127.0.0.1:8084/apidoc/ return a 404 > > Demo > package main > > import ( > "fmt" > "github.com/gorilla/mux" > "net/http" > ) > > func main() { > router := mux.NewRouter() > router.PathPrefix("/apidoc/").Handler(http.StripPrefix("/apidoc/", >

[go-nuts] Re: Gorilla toolkit - mux with http.FileServer returning 404

2023-03-21 Thread zhiwei dong
The 127.0.0.1:8084/apidoc/ return a 404 Demo package main import ( "fmt" "github.com/gorilla/mux" "net/http" ) func main() { //http.Handle("/apidoc/", http.StripPrefix("/apidoc", http.FileServer(http.Dir("api-swagger" //if err := http.ListenAndServe(":8082", nil); err != nil { //