File size: 985 Bytes
2fe573b | 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 28 29 30 31 | # Start Backend Server
Write-Host "Starting TalimBot Backend..." -ForegroundColor Green
# Check if Python is installed
try {
$pythonVersion = python --version 2>&1
Write-Host "Python found: $pythonVersion" -ForegroundColor Cyan
} catch {
Write-Host "ERROR: Python not found. Please install Python 3.8 or higher." -ForegroundColor Red
exit 1
}
# Navigate to backend directory
$backendPath = Join-Path $PSScriptRoot "backend"
Set-Location $backendPath
# Check if requirements are installed
Write-Host "Checking dependencies..." -ForegroundColor Yellow
$requirementsExist = Test-Path "requirements.txt"
if ($requirementsExist) {
Write-Host "Installing/updating dependencies..." -ForegroundColor Yellow
pip install -r requirements.txt
}
# Start the server
Write-Host "`nStarting FastAPI server on http://localhost:8000" -ForegroundColor Green
Write-Host "Press Ctrl+C to stop the server`n" -ForegroundColor Yellow
python main.py
|