repos
/ orchard main

orchard

mirror

Every site I host, in one repo, along with the Cloudflare Tunnel and Caddy that front them. It's all Go, Vite, and SQLite, and it runs on a desktop at home with nothing listening on an inbound port.

blogbuncaddycloudflare-tunneldockergogolanghomelabhtml-templatemonorepoself-hostedseosqlitestatic-sitetypstuptime-monitoringviteweb-analytics

356 B · 14 lines · Go Raw History
 1//go:build !embed
 2
 3package main
 4
 5import (
 6	"io/fs"
 7	"os"
 8)
 9
10// distFS reads the Vite bundle off disk so a running server picks up rebuilds.
11// A build tag rather than a runtime check, because //go:embed fails at compile
12// time on a missing directory and a fresh clone has no build/.
13func distFS() fs.FS { return os.DirFS(dir("SITE_DIST", "build/dist")) }