/kam-á/
橘子的臺語
Tangerine in Taiwanese Hokkien
Kama is a lightweight Go package for building frontend-backend separated web applications.
In development mode, it proxies all unmatched HTTP requests to a frontend dev server (e.g. Vite, Next.js).
In production mode, it serves static files from an embedded filesystem, with optional overrides from a local directory—no recompilation required.
- Supports both
net/http
andgin
framework - Proxies requests to a frontend dev server during development
- Serves static files via
embed.FS
in production - Allows local static file override on top of embedded files
go get github.com/simbafs/kama
//go:embed all:static
var embededFS embed.FS
kama.New(embeddedFS,
kama.WithDevServer("http://localhost:3001"),
kama.WithPath("static"),
)
See the _example/ directory for simple examples. There is a complete example counter