Spaces:
Paused
Paused
| # Kill any existing process on port 8000 | |
| echo "Checking for existing server on port 8000..." | |
| EXISTING_PID=$(lsof -ti:8000) | |
| if [ ! -z "$EXISTING_PID" ]; then | |
| echo "Killing existing process $EXISTING_PID" | |
| kill -9 $EXISTING_PID 2>/dev/null | |
| sleep 2 | |
| fi | |
| # Activate virtual environment and start server | |
| echo "Starting server..." | |
| source venv/bin/activate | |
| python main.py | |