Run dev servers in background, log to /tmp

Backend and frontend now run in background so Gin debug output
is preserved. View logs with:
  tail -f /tmp/imc-backend.log
  tail -f /tmp/imc-frontend.log
This commit is contained in:
Christoph Haas 2026-03-26 01:03:18 +01:00
parent 21a2ffbd44
commit 93922e4cad

View file

@ -32,10 +32,18 @@ build-backend: build-frontend
# Development targets
dev:
@echo "Starting backend dev server (hot-reload enabled)..."
cd $(BACKEND_DIR) && USE_EMBEDDED=false $(HOME)/go/bin/air &
cd $(BACKEND_DIR) && USE_EMBEDDED=false $(HOME)/go/bin/air > /tmp/imc-backend.log 2>&1 &
@echo "Backend started, PID: $$(pgrep -f air)"
sleep 3
@echo "Starting frontend dev server..."
cd $(FRONTEND_DIR) && bun run dev
cd $(FRONTEND_DIR) && bun run dev > /tmp/imc-frontend.log 2>&1 &
@echo "Frontend started, PID: $$(pgrep -f 'vite')"
@echo ""
@echo "Logs:"
@echo " Backend: tail -f /tmp/imc-backend.log"
@echo " Frontend: tail -f /tmp/imc-frontend.log"
@echo ""
@echo "Stop with: pkill -f 'air|vite'"
dev-frontend:
@echo "Starting frontend dev server..."