tools / start_server.sh
Tataaicoltd's picture
deploy: admin dashboard + FastAPI backend
a62f8b4 verified
Raw History Blame Contribute Delete
630 Bytes
#!/bin/bash
# Start the FastAPI server with auto-reload
set -e
# Get the directory of this script
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Change to backend directory
cd "$SCRIPT_DIR/backend"
echo "๐Ÿš€ Starting FastAPI server..."
echo "๐Ÿ“ Port: 4000"
echo "๐Ÿ”„ Auto-reload: Enabled"
echo "๐Ÿ“„ API Docs: http://localhost:4000/docs"
echo ""
# Activate virtual environment if it exists
if [ -f "$SCRIPT_DIR/backend/venv/bin/activate" ]; then
source "$SCRIPT_DIR/backend/venv/bin/activate"
fi
# Start the server with auto-reload
python3 -m uvicorn main:app --host 0.0.0.0 --port 4000 --reload