From 0cdc50c0ed0c8156ab9b6f8132df3525bbe423a1 Mon Sep 17 00:00:00 2001 From: JeremyFunk Date: Fri, 11 Sep 2026 14:38:57 +0200 Subject: [PATCH] fix(dev): stop .env.example pinning the web app to dead fixed ports bun dev derives VITE_API_BASE_URL and VITE_ELECTRIC_SYNC_URL from the portless routes, but vite.config.ts only fills them when unset. The template still set the pre-alchemy fixed ports (3472, 3476), so any .env.local copied from it sent every web API call to a closed port. --- .env.example | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index cf703e75e..1cf984652 100644 --- a/.env.example +++ b/.env.example @@ -62,13 +62,12 @@ MAPLE_ROOT_PASSWORD=change-me # Required when MAPLE_AUTH_MODE=self_hosted MAPLE_DEFAULT_ORG_ID=default -# Web app overrides (auto-derived from above if not set) -# When running `bun dev:portless`, VITE_API_BASE_URL / VITE_INGEST_URL / -# VITE_CHAT_AGENT_URL are auto-set to https://-.localhost so -# multiple worktrees can run side by side. Values set here still win. -VITE_API_BASE_URL=http://localhost:3472 +# Web app overrides. `bun dev` derives VITE_API_BASE_URL / VITE_INGEST_URL / +# VITE_ELECTRIC_SYNC_URL from the portless routes (https://[.].localhost). +# A value set here wins over that, so leave them unset unless an app runs on a raw port. +# VITE_API_BASE_URL=http://localhost:3472 # Origin of the standalone ElectricSQL shape-proxy worker (apps/electric-sync). -VITE_ELECTRIC_SYNC_URL=http://localhost:3476 +# VITE_ELECTRIC_SYNC_URL=http://localhost:3476 VITE_MAPLE_AUTH_MODE=self_hosted VITE_CLERK_SIGN_IN_URL=/sign-in VITE_CLERK_SIGN_UP_URL=/sign-up