From b9ee643bf6056a8ecaad79689d7bb1630a0ef606 Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Mon, 3 Aug 2026 17:24:39 -0700 Subject: [PATCH] Stop the bootstrap scripts claiming the dev webapp targets the local backend It never has: setDevelopment() is commented out in main.tsx, so the dev server falls through to its /v1 proxy at api.storyteller.ai. Both bootstrap epilogues and the seed script now say so and print the VITE_DEV_API_HOST needed to actually reach the local backend. --- script/bootstrap/bootstrap_dev_stack.sh | 6 +++--- script/bootstrap/windows/bootstrap_dev_stack.ps1 | 8 +++++--- script/bootstrap/windows/seed_demo_user.ps1 | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/script/bootstrap/bootstrap_dev_stack.sh b/script/bootstrap/bootstrap_dev_stack.sh index ca501909cf..983f84233a 100755 --- a/script/bootstrap/bootstrap_dev_stack.sh +++ b/script/bootstrap/bootstrap_dev_stack.sh @@ -344,9 +344,9 @@ The dev stack is bootstrapped. Next steps: ./script/bootstrap/seed_demo_user.sh Credentials: ${DEMO_USERNAME} / ${DEMO_PASSWORD} - 3. Start the webapp (binds http://localhost:4201; in dev it talks to - ${DEV_BACKEND_URL} automatically): - cd frontend && npx nx dev artcraft-webapp + 3. Start the webapp (binds http://localhost:4201). NB: by default the dev + webapp proxies to PRODUCTION — aim it at your backend explicitly: + cd frontend && VITE_DEV_API_HOST=${DEV_BACKEND_URL} npx nx dev artcraft-webapp Health checks at any time: ./script/bootstrap/dev_stack_doctor.sh diff --git a/script/bootstrap/windows/bootstrap_dev_stack.ps1 b/script/bootstrap/windows/bootstrap_dev_stack.ps1 index 0d11a02a72..ccfff15f28 100644 --- a/script/bootstrap/windows/bootstrap_dev_stack.ps1 +++ b/script/bootstrap/windows/bootstrap_dev_stack.ps1 @@ -19,7 +19,8 @@ # After it succeeds: # .\script\bootstrap\windows\run_backend_dev.ps1 # API on :12345 # .\script\bootstrap\windows\seed_demo_user.ps1 # demo login -# cd frontend; npx nx dev artcraft-webapp # webapp on :4201 +# cd frontend; npx nx dev artcraft-webapp # webapp on :4201, but see +# # VITE_DEV_API_HOST below param( [switch]$Yes, [switch]$SkipTools, @@ -457,8 +458,9 @@ The dev stack is bootstrapped. Next steps: .\script\bootstrap\windows\seed_demo_user.ps1 Credentials: $DemoUsername / $DemoPassword - 3. Start the webapp (binds http://localhost:4201; in dev it talks to - $DevBackendUrl automatically): + 3. Start the webapp (binds http://localhost:4201). NB: by default the dev + webapp proxies to PRODUCTION - aim it at your backend explicitly: + `$env:VITE_DEV_API_HOST = "$DevBackendUrl" cd frontend; npx nx dev artcraft-webapp Health checks at any time: diff --git a/script/bootstrap/windows/seed_demo_user.ps1 b/script/bootstrap/windows/seed_demo_user.ps1 index efa76051dc..cc4185b2d1 100644 --- a/script/bootstrap/windows/seed_demo_user.ps1 +++ b/script/bootstrap/windows/seed_demo_user.ps1 @@ -120,4 +120,5 @@ if (-not $walletRow) { Write-Log "Demo user is ready." Write-Log " Username: $DemoUsername" Write-Log " Password: $DemoPassword" -Write-Log "Log in at the webapp /login page (http://localhost:4201/login once 'nx dev artcraft-webapp' is running)." +Write-Log "Log in at http://localhost:4201/login once the webapp is running - start it with" +Write-Log "VITE_DEV_API_HOST=$DevBackendUrl set, or it will talk to production instead."