Configure Vite dev proxy via VITE_BACKEND_URL
This commit is contained in:
@@ -135,9 +135,13 @@ frontend/
|
||||
```
|
||||
|
||||
> **Dev proxy target:** `vite.config.ts` proxies all `/api` requests to
|
||||
> `http://backend:8000`. Use the compose **service name** (`backend`), not
|
||||
> `localhost` — inside the container network `localhost` resolves to the
|
||||
> frontend container itself and causes `ECONNREFUSED`.
|
||||
> `http://backend:8000` by default. Set `VITE_BACKEND_URL` in `frontend/.env`
|
||||
> or your shell to override the backend address for local development outside
|
||||
> Docker.
|
||||
>
|
||||
> Use the compose **service name** (`backend`), not `localhost` — inside the
|
||||
> container network `localhost` resolves to the frontend container itself and
|
||||
> causes `ECONNREFUSED`.
|
||||
|
||||
### Separation of Concerns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user