// Package ui embeds the production build of the single-page application so// the ori server ships as a single binary.//// The Vite build writes to ui/dist (run `make build-ui`). When dist only// contains the committed .gitkeep placeholder, the server still compiles and// answers with an explanatory error page instead of the SPA.packageuiimport("embed""io/fs")//go:embed all:distvardistembed.FS// Dist returns the embedded SPA build as a filesystem rooted at the dist// directory, i.e. index.html lives at the root of the returned fs.FS.//// Example://// http.Handle("/", http.FileServerFS(ui.Dist()))funcDist()fs.FS{sub,err:=fs.Sub(dist,"dist")iferr!=nil{// The dist directory is embedded at compile time; its absence is a// build-system bug, not a runtime condition a caller could handle.panic(err)}returnsub}
One first-party cookie so a repeat visit isn't counted twice. No cross-site tracking, nothing stored until you accept. Cookie Policy.