# ============================================================
# CANIFA BACKEND - Quick Reference
# ============================================================

# === LOCAL DEV (port 5000) ===
.\.venv\Scripts\activate
uvicorn server:app --host 0.0.0.0 --port 5000 --reload

# === DOCKER (port 5004, hot reload) ===
docker compose up -d --build
docker restart canifa_backend
docker logs -f canifa_backend
docker restart canifa_backend && docker logs -f canifa_backend
docker compose down

# === KILL PORT ===
taskkill /F /IM python.exe
netstat -ano | findstr :5004 | ForEach-Object { $_.Split()[-1] } | Sort-Object -Unique | ForEach-Object { taskkill /F /PID $_ }

git add backend/api/test_conversation_route.py backend/common/middleware.py backend/static/test_conversation.html

git commit -m "feat: per-message SSE streaming, localStorage persistence, resume from incomplete, fix ASGI middleware buffering"

git push --force origin main