mirror of
https://github.com/skoelle/calender_sync.git
synced 2026-09-17 18:20:24 +00:00
demo showcase
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
VENV_DIR="$SCRIPT_DIR/.venv"
|
||||
DB_PATH="$SCRIPT_DIR/demo/demo.db"
|
||||
|
||||
echo "=== Calendar Sync Demo ==="
|
||||
|
||||
# Venv erstellen
|
||||
if [ ! -d "$VENV_DIR" ]; then
|
||||
echo "Erstelle virtuelles Umfeld..."
|
||||
python3 -m venv "$VENV_DIR"
|
||||
fi
|
||||
|
||||
source "$VENV_DIR/bin/activate"
|
||||
|
||||
# Dependencies installieren (ohne mysql-connector)
|
||||
pip install -q --upgrade pip
|
||||
pip install -q fastapi uvicorn[standard] jinja2 icalendar recurring-ical-events
|
||||
|
||||
# Demo-Datenbank erstellen
|
||||
echo "Erstelle Demo-Datenbank mit 4 Terminen..."
|
||||
python "$SCRIPT_DIR/demo/seed.py"
|
||||
|
||||
# API starten
|
||||
echo ""
|
||||
echo "Starte API auf http://localhost:8000"
|
||||
echo " Web-UI: http://localhost:8000/"
|
||||
echo " API: http://localhost:8000/api/events"
|
||||
echo " Health: http://localhost:8000/api/health"
|
||||
echo ""
|
||||
echo "Druecke Ctrl+C zum Beenden."
|
||||
echo ""
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
DB_BACKEND=sqlite DB_PATH="$DB_PATH" \
|
||||
exec python -m uvicorn api.main:app --host 0.0.0.0 --port 8000
|
||||
Reference in New Issue
Block a user