#!/bin/bash
cd "/Users/daddykayleigh/Desktop/personal learn/mkuconnect/backend"

# Kill any existing Daphne
pkill -f daphne 2>/dev/null
sleep 1

# Clear Python cache
find . -name "*.pyc" -delete 2>/dev/null
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null

echo "Starting ThikaConnect backend..."
venv_new/bin/daphne -b 127.0.0.1 -p 8000 config.asgi:application
