mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-13 11:40:53 +08:00
Comments, doc comments, UI labels, log and error messages, LLM prompt strings, markdown docs, test data and assertions. Identifiers, enum keys, routes, placeholders and code structure are unchanged. Notes: - docs/漏洞流量证据.md renamed to docs/vulnerability-traffic-evidence.md - tests that exercised CJK specific handling (GBK zip names, Chinese full text search) now use ASCII equivalents; go build passes and the test suite matches the pre translation baseline (remaining failures need a PostgreSQL DSN and fail identically on the original) - frontend mention syntax now uses English kinds (finding, asset, ...) matching the backend, chat mentions tests pass
19 lines
708 B
Go
19 lines
708 B
Go
//go:build !embedui
|
|
|
|
package server
|
|
|
|
import "net/http"
|
|
|
|
// webuiHandler is the no-embed stub (default build). The frontend is NOT bundled
|
|
// into this binary — run it separately with `cd web && npm run dev` during
|
|
// development. Build the bundled single-binary with:
|
|
//
|
|
// cd web && npm run build:static # produces web/out
|
|
// cp -r web/out server/webui/dist # (or use the build script)
|
|
// go build -tags embedui ./cmd/artex
|
|
func (s *Server) webuiHandler() http.Handler {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
|
http.Error(w, "Frontend is not embedded in this binary (use next dev for development; build with -tags embedui for release)", http.StatusNotFound)
|
|
})
|
|
}
|