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

376 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 `bun run dev` can rewrite build/dist
11// under a running server. A build tag rather than a runtime check because
12// //go:embed needs the directory to exist at compile time, and a fresh clone lacks it.
13func distFS() fs.FS { return os.DirFS(env("SITE_DIST", "build/dist")) }