mirror of
https://github.com/wweir/sower.git
synced 2026-10-20 00:15:34 +00:00
- internal/admin: session-cookie auth server, rule CRUD API, bounded per-domain traffic stats with pre-parse byte accounting - cmd/sower: wrap proxied connections and DNS queries into stats, serve the admin console on its own listener - web/: Svelte 5 + Vite admin console with shadcn-svelte UI and an advanced breadcrumb header (section/context dropdowns, favorites), embedded via go:embed and committed to web/dist - Makefile: sower build depends on the frontend build (bun); sowerd does not - docs: ARCHITECTURE, README, and plan updated for the admin surface
30 lines
600 B
Makefile
30 lines
600 B
Makefile
MAKEFLAGS += --jobs all
|
|
GO:=CGO_ENABLED=0 go
|
|
|
|
default: test build
|
|
|
|
test:
|
|
${GO} vet ./...
|
|
${GO} test ./...
|
|
|
|
build: sower sowerd
|
|
.PHONY: web
|
|
web:
|
|
cd web && bun install --frozen-lockfile && bun run build
|
|
|
|
.PHONY: sower
|
|
sower: web
|
|
${GO} build -ldflags "\
|
|
-X main.version=$(shell git describe --tags --always) \
|
|
-X main.date=$(shell date +%Y-%m-%d)" \
|
|
-o sower ./cmd/sower
|
|
.PHONY: sowerd
|
|
sowerd:
|
|
${GO} build -ldflags "\
|
|
-X main.version=$(shell git describe --tags --always) \
|
|
-X main.date=$(shell date +%Y-%m-%d)" \
|
|
-o sowerd ./cmd/sowerd
|
|
|
|
clean:
|
|
rm -f sower sowerd sower.exe sowerd.exe
|