File size: 630 Bytes
a62f8b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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