build: support running the server with go run during development

- The dev build tag reads web/dist from disk instead of embedding it,
  so the backend starts without building the frontend first; Vite
  serves the UI and proxies /api and WebSocket to the Go server
- Document the two-terminal dev workflow and ignore .dev-data/
This commit is contained in:
eezd committed 2026-10-16 18:46:13 +08:00
1 parent bfe0a0654d
commit dc7e43bc3c
4 files changed
+36 -4

No files matched your search

+3
View File
@@ -1,4 +1,7 @@
//go:build !dev
// Package web 把前端构建产物(web/dist,由 npm run build 生成)嵌入 Go 二进制。
// 开发时使用 -tags dev,前端由 Vite 开发服务器提供,见 embed_dev.go。
package web
import (