#!/usr/bin/env bash set -euo pipefail # KosmoConnect Backend Dev Runner # Usage: ./run-dev.sh [ingestion|api] SERVICE="${1:-}" if [ -z "$SERVICE" ]; then echo "Usage: ./run-dev.sh [ingestion|api]" exit 1 fi cd "$(dirname "$0")" export PYTHONPATH="${PYTHONPATH:-}:$(pwd)/shared" if [ "$SERVICE" = "ingestion" ]; then echo "Starting Ingestion Service..." uvicorn ingestion.src.main:app --host 0.0.0.0 --port 8001 --reload elif [ "$SERVICE" = "api" ]; then echo "Starting API Service..." uvicorn api.src.main:app --host 0.0.0.0 --port 8002 --reload elif [ "$SERVICE" = "gateway" ]; then echo "Starting Gateway Service..." uvicorn gateway.src.main:app --host 0.0.0.0 --port 8003 --reload elif [ "$SERVICE" = "billing" ]; then echo "Starting Billing Service..." uvicorn billing.src.main:app --host 0.0.0.0 --port 8004 --reload else echo "Unknown service: $SERVICE" echo "Usage: ./run-dev.sh [ingestion|api]" exit 1 fi