From 228091e9882a850858ff157dd32374a3b0a6276f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 19:53:50 +1100 Subject: [PATCH] fix(dev): reload the API only for changes under api/ (#118) uvicorn --reload watched the whole repo, which sits in a OneDrive folder, so a sync anywhere could restart or stop the API. Watch api/ only, in start-api.ps1 and the QUICKSTART command. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019YPoXzBSj89ZHgw7nfTmbB --- docs/QUICKSTART.md | 2 +- scripts/start-api.ps1 | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 1a67c41..72f6ac2 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -96,7 +96,7 @@ Or manually: ```powershell $env:CORS_ORIGINS = "http://localhost:8080,http://localhost:5173,http://localhost:3000" -uvicorn api.main:app --reload --port 8000 +uvicorn api.main:app --reload --reload-dir api --port 8000 ``` Verify it's running: open `http://localhost:8000/api/health` — should return diff --git a/scripts/start-api.ps1 b/scripts/start-api.ps1 index c281502..882740f 100644 --- a/scripts/start-api.ps1 +++ b/scripts/start-api.ps1 @@ -40,4 +40,6 @@ if ($busy) { Set-Location (Join-Path $PSScriptRoot "..") $host.UI.RawUI.WindowTitle = "API (port 8000)" Write-Host "API starting on http://localhost:8000 (docs: /docs)" -ForegroundColor Green -python -m uvicorn api.main:app --reload --port 8000 +# #118: watch only api/ for code changes. Watching the whole repo meant a OneDrive +# sync anywhere in the folder could restart (or stop) the API. +python -m uvicorn api.main:app --reload --reload-dir api --port 8000