Spaces:
Running
Running
File size: 684 Bytes
dc71cad | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/env bash
# scripts/start_api.sh
# βββββββββββββββββββββ
# Start the FastAPI development server
set -e
PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$PROJECT_ROOT"
echo "π Starting Code Review Agent API..."
echo " Docs: http://localhost:8000/docs"
echo " WS: ws://localhost:8000/ws/{task_id}"
echo ""
# Install dependencies if not in venv
if [ ! -d ".venv" ]; then
echo "βοΈ Creating virtual environment..."
python3 -m venv .venv
.venv/bin/pip install -e ".[api]" --quiet
fi
# Start FastAPI
.venv/bin/python -m uvicorn api.main:app \
--host 0.0.0.0 \
--port 8000 \
--reload \
--log-level info
|