Desi-Clans/scripts/dev-backend.ps1
2026-10-08 02:52:58 +05:30

16 lines
452 B
PowerShell

$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
Set-Location (Join-Path $Root "backend")
if (-not (Test-Path ".venv")) {
python -m venv .venv
}
& .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
if (-not (Test-Path ".env")) {
Copy-Item ".env.example" ".env"
Write-Host "Created backend/.env from .env.example — update values as needed."
}
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000