Skip to content

static-assets capability

static-assets adds embedded static file serving to your Go service using Go’s embed.FS for single-binary deployments.

  • Embedded file server
  • Cache-control headers
  • Content-type detection

Use static-assets to serve CSS, JavaScript, images, or any static files directly from your Go binary. Embedding assets removes the need for a separate file server and simplifies deployment — one binary contains everything.

Requires: http-api

Suggests: templ

Terminal window
verikt new my-service --language go --cap http-api,static-assets
# or add to an existing service:
verikt add static-assets

templ

Server-rendered templates served alongside static assets.

htmx

HTMX library served as a static asset.

http-api

The Chi router foundation required by this capability.