nun mal erste komplette Version mit API und Frontend (React !)

This commit is contained in:
rxf
2026-02-07 14:12:13 +01:00
parent 6e1f5744f9
commit 9c5f985cab
22 changed files with 1302 additions and 0 deletions

45
start-dev.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
# Script zum lokalen Starten aller Services
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "🚀 Starte Wetterstation Services..."
echo ""
# API starten
echo "📡 Starte API auf Port 8000..."
cd "$SCRIPT_DIR"
source .venv/bin/activate
python -m uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload &
API_PID=$!
echo "API gestartet mit PID $API_PID"
echo ""
# Kurz warten bis API bereit ist
sleep 3
# Frontend starten
echo "🎨 Starte Frontend auf Port 3000..."
cd "$SCRIPT_DIR/frontend"
npm run dev &
FRONTEND_PID=$!
echo "Frontend gestartet mit PID $FRONTEND_PID"
echo ""
echo "✅ Alle Services gestartet!"
echo ""
echo "📊 API: http://localhost:8000"
echo "📊 API Docs: http://localhost:8000/docs"
echo "🌐 Frontend: http://localhost:3000"
echo ""
echo "Drücken Sie Ctrl+C um alle Services zu stoppen..."
echo ""
# Trap zum Beenden aller Prozesse
trap "echo ''; echo '🛑 Stoppe Services...'; kill $API_PID $FRONTEND_PID 2>/dev/null; exit 0" INT TERM
# Warte auf Beendigung
wait