Documentation
¶
Overview ¶
This package provides HTTP server handlers for serving static files. In development mode, it proxies requests to a frontend development server. In production mode, it serves files from the embedded filesystem, with optional overrides from a local directory in the current working directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kama ¶
type Kama struct {
// contains filtered or unexported fields
}
func (*Kama) Go ¶ added in v0.2.0
func (k *Kama) Go() http.HandlerFunc
Go returns a http.HandlerFunc for http mux in standard library
type KamaOption ¶
type KamaOption func(*Kama)
func WithDevServer ¶ added in v0.4.0
func WithDevServer(devServer string) KamaOption
WithDevServer sets the dev server URL (default is http://localhost:3001)
func WithPath ¶ added in v0.4.0
func WithPath(path string) KamaOption
WithPath sets the path to the static directory (default is "static")
func WithTree ¶ added in v1.0.0
func WithTree(tree string) KamaOption
WithTree enable a endpoint to show the tree of filesystem