Files
catalogue_frontend/.env.example
Suriyakumarvijayanayagam 0dd8427817 Point the build-arg docs at the real API domain, mcp.nearle.ai.in
The API deployed to mcp.nearle.ai.in rather than mcp.catalogue.nearle.ai.in.
This matters more here than on the backend: VITE_API_BASE_URL is inlined at
build time, so a bundle built from the old value calls a host that does not
exist and every request fails with nothing in the server logs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 13:29:34 +05:30

25 lines
1.0 KiB
Plaintext

# Base URL of the FastAPI backend.
#
# Leave it unset for local development: Vite's dev proxy (see vite.config.js)
# forwards /api/* to http://127.0.0.1:8000, so relative requests just work and
# no CORS setup is needed.
#
# Set it whenever the API is served from a different origin than the app. In
# production the React app is served from catalogue.nearle.ai.in and the API
# lives on its own subdomain, so the deployed build needs:
#
# VITE_API_BASE_URL=https://mcp.nearle.ai.in
#
# No trailing slash - src/api/client.js concatenates paths that already start
# with "/api".
#
# IMPORTANT: Vite inlines this at BUILD time, not at run time. Setting it on
# the running container does nothing; it has to be passed to `npm run build`.
# The Dockerfile exposes it as a build arg for exactly this reason:
#
# docker build --build-arg VITE_API_BASE_URL=https://mcp.nearle.ai.in .
#
# Whatever origin you set here must also appear in the backend's
# API_CORS_ORIGINS, or the browser will block every response.
# VITE_API_BASE_URL=https://mcp.nearle.ai.in