feat(m6): CSV export, Makefile, README, single-binary build
This commit is contained in:
34
Makefile
Normal file
34
Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
.PHONY: build build-web build-go dev test clean
|
||||
|
||||
# Build the production single binary (embeds the Svelte SPA)
|
||||
build: build-web build-go
|
||||
|
||||
build-web:
|
||||
@echo "==> Building Svelte frontend..."
|
||||
cd web && npm run build
|
||||
|
||||
build-go:
|
||||
@echo "==> Building Go binary (production, embeds web/build)..."
|
||||
go build -tags production -o wotra ./cmd/wotra
|
||||
|
||||
# Development mode: run Go server + Vite dev server concurrently
|
||||
dev:
|
||||
@echo "==> Starting development servers..."
|
||||
@echo " Go API: http://localhost:8080"
|
||||
@echo " Vite UI: http://localhost:5173"
|
||||
@trap 'kill 0' INT; \
|
||||
AUTH_TOKEN=$${AUTH_TOKEN:-devtoken} go run ./cmd/wotra & \
|
||||
cd web && npm run dev
|
||||
|
||||
# Run all Go tests
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
# Install frontend dependencies
|
||||
web/node_modules:
|
||||
cd web && npm install
|
||||
|
||||
# Remove build artifacts
|
||||
clean:
|
||||
rm -f wotra
|
||||
rm -rf web/build web/.svelte-kit
|
||||
Reference in New Issue
Block a user