Documentation
¶
Overview ¶
Package webdemo serves the tailcat browser app (the js/wasm build of tailcat in the web/ directory) from a distribution directory of prebuilt static files, as produced by cmd/tailcat-webdist. It is used by cmd/tailcat-web, the browser integration tests, and external servers that host the demo (such as tailcat.dev).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler returns an HTTP handler serving the web app from dist, a filesystem containing the files built by wasmbuild.Dist: index.html at "/", app.js, wasm_exec.js, and main.wasm, the latter served precompressed (from main.wasm.zst or main.wasm.gz, if present in dist) when the client's Accept-Encoding allows.
The page's asset URLs are all relative, so the handler may be mounted under a path prefix with http.StripPrefix.
Types ¶
This section is empty.