Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SPAHandler ¶
type SPAHandler struct {
// contains filtered or unexported fields
}
SPAHandler serves a React single-page application. It serves static files when they exist, otherwise falls back to index.html for client-side routing.
func NewSPAHandler ¶
func NewSPAHandler(logger logrus.FieldLogger) (*SPAHandler, error)
NewSPAHandler creates a new SPA handler.
func (*SPAHandler) ServeHTTP ¶
func (h *SPAHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler.
Click to show internal directories.
Click to hide internal directories.