1- Write-Host ' Creating python virtual environment "backend/backend_env"'
1+ Set-Location ../
2+
3+ Write-Host ' Creating python virtual environment ".venv"'
24$pythonCmd = Get-Command python - ErrorAction SilentlyContinue
35if (-not $pythonCmd ) {
46 # fallback to python3 if python not found
57 $pythonCmd = Get-Command python3 - ErrorAction SilentlyContinue
68}
7- Start-Process - FilePath ($pythonCmd ).Source - ArgumentList " -m venv ./backend/backend_env " - Wait - NoNewWindow
9+ Start-Process - FilePath ($pythonCmd ).Source - ArgumentList " -m venv .venv " - Wait - NoNewWindow
810
911Write-Host " "
1012Write-Host " Restoring backend python packages"
1113Write-Host " "
1214
13- $venvPythonPath = " ./venv/scripts /python.exe"
15+ $venvPythonPath = " ./. venv/Scripts /python.exe"
1416if (Test-Path - Path " /usr" ) {
1517 # fallback to Linux venv path
16- $venvPythonPath = " ./venv/bin/python"
18+ $venvPythonPath = " ./. venv/bin/python"
1719}
1820
1921Start-Process - FilePath $venvPythonPath - ArgumentList " -m pip install -r app/backend/requirements.txt" - Wait - NoNewWindow
@@ -25,7 +27,7 @@ if ($LASTEXITCODE -ne 0) {
2527Write-Host " "
2628Write-Host " Restoring frontend npm packages"
2729Write-Host " "
28- Set-Location .. / frontend
30+ Set-Location app / frontend
2931npm install
3032if ($LASTEXITCODE -ne 0 ) {
3133 Write-Host " Failed to restore frontend npm packages"
@@ -46,6 +48,13 @@ Write-Host "Starting backend"
4648Write-Host " "
4749Set-Location ../ backend
4850
51+ # Update venv path for backend directory
52+ $venvPythonPath = " ../../.venv/Scripts/python.exe"
53+ if (Test-Path - Path " /usr" ) {
54+ # fallback to Linux venv path
55+ $venvPythonPath = " ../../.venv/bin/python"
56+ }
57+
4958$port = 50505
5059$hostname = " localhost"
5160Start-Process - FilePath $venvPythonPath - ArgumentList " -m quart --app main:app run --port $port --host $hostname --reload" - Wait - NoNewWindow
0 commit comments