This commit is contained in:
@@ -61,6 +61,12 @@ Handy macros: `\R`, `\N`, `\Z`, `\Q`, `\C` for the number sets.
|
||||
| `backend/.env` | `PORT` | `5000` | API port |
|
||||
| `backend/.env` | `MONGO_URI` | `mongodb://127.0.0.1:27017/mathew` | Mongo connection |
|
||||
| `frontend` env | `NUXT_PUBLIC_API_BASE` | `http://localhost:5000` | Where the UI calls the API |
|
||||
| `frontend` build | `NUXT_API_PROXY_TARGET` | `http://localhost:5000` | Where the Nuxt server's own (SSR) `/api` calls are forwarded |
|
||||
|
||||
In Docker the frontend image builds with `NUXT_PUBLIC_API_BASE=` (empty): the browser calls
|
||||
`/api` on its own origin and nginx routes it to `http://backend:5000` — the same hop answers
|
||||
the Nuxt server's SSR calls, which the image points at the backend container via
|
||||
`NUXT_API_PROXY_TARGET`.
|
||||
|
||||
## Editing tips
|
||||
|
||||
|
||||
Reference in New Issue
Block a user