We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi teams,
I want to serving FileSystem handler in gorilla mux framework.
But always don't work well, show code:
import ( "flag" "log" "net/http" "time" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" _ "github.com/kubeflow/pipelines/backend/src/apiserver/openapi/generate/statik" ) func main() { r := mux.NewRouter() // StatikFS serve. statikFS, _ := fs.New() r.PathPrefix("").Handler(http.StripPrefix("/swagger", http.FileServer(statikFS))) srv := &http.Server{ Handler: r, Addr: "127.0.0.1:8000", // Good practice: enforce timeouts for servers you create! WriteTimeout: 15 * time.Second, ReadTimeout: 15 * time.Second, } log.Printf("serving") log.Fatal(srv.ListenAndServe()) }
thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi teams,
I want to serving FileSystem handler in gorilla mux framework.
But always don't work well, show code:
thanks
The text was updated successfully, but these errors were encountered: