mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09:41 +02:00
feat(app): introduce react configurations [EE-1809] (#5953)
This commit is contained in:
parent
b285219a58
commit
85a6a80722
50 changed files with 8974 additions and 599 deletions
23
api/http/handler/storybook/handler.go
Normal file
23
api/http/handler/storybook/handler.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package storybook
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"path"
|
||||
)
|
||||
|
||||
// Handler represents an HTTP API handler for managing static files.
|
||||
type Handler struct {
|
||||
http.Handler
|
||||
}
|
||||
|
||||
// NewHandler creates a handler to serve static files.
|
||||
func NewHandler(assetsPath string) *Handler {
|
||||
h := &Handler{
|
||||
http.FileServer(http.Dir(path.Join(assetsPath, "storybook"))),
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
func (handler *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
handler.Handler.ServeHTTP(w, r)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue