subidx/Makefile
lakshit verma 41a2828ef0
decouple the dashboard from the server binary
Move the Svelte dashboard out of internal/web into its own top-level
frontend/ so it can be built and hosted independently, and make the
subidx binary API-only: drop the embedded dist and the catch-all /
handler, so unknown paths return a plain 404.

The frontend already knew how to live apart (VITE_API_BASE, -cors-origins,
vercel.json), so only the embed glue is gone. Also wire in Vercel Web
Analytics via @vercel/analytics.
2026-08-28 23:45:25 +05:30

23 lines
530 B
Makefile

.PHONY: all ui build test vet serve dev clean
all: build
# Build the dashboard UI for a separate host (Vercel, Render, or any
# static host). Point it at the subidx API with VITE_API_BASE; the
# binary no longer embeds or serves the UI.
ui:
cd frontend && npm ci && npm run build
build: go build -o subidx .
test: go test -race -count=1 ./...
vet: go vet ./...
serve: go run . serve -store ./data -addr 127.0.0.1:8099
dev:
cd frontend && SUBIDX_API=$${SUBIDX_API:-http://127.0.0.1:8080} npm run dev
clean:
rm -f subidx