Phase 0: project scaffold
- Go module + chi server with embedded SPA serving and /api/health - internal/config env loader (local-dev defaults; auth/copyleaks deferred) - React 19 + Vite 6 + Tailwind v4 frontend with full Petal design tokens - Frontend embedded into the binary via web/embed.go (go:embed all:dist) - README dev workflow, .env.example, BUILD_PLAN progress tracker - Verified end-to-end: binary serves health, embedded SPA, and SPA fallback
This commit is contained in:
12
web/embed.go
Normal file
12
web/embed.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// Package web embeds the built frontend assets so the Go binary can serve them
|
||||
// directly (single-binary deployment). The embed path is relative to this file,
|
||||
// so it must live alongside the dist/ directory.
|
||||
package web
|
||||
|
||||
import "embed"
|
||||
|
||||
// DistFS holds the built frontend (web/dist). `all:` includes the committed
|
||||
// .gitkeep placeholder, so this compiles even before `npm run build` runs.
|
||||
//
|
||||
//go:embed all:dist
|
||||
var DistFS embed.FS
|
||||
Reference in New Issue
Block a user