From f7937c374476ecc0e663fc90869c5a4c97a66060 Mon Sep 17 00:00:00 2001 From: goulustis Date: Thu, 5 Mar 2026 11:51:31 +0800 Subject: [PATCH] print which back end port it is connecting to --- frontend/src/api/frontApis.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/api/frontApis.ts b/frontend/src/api/frontApis.ts index 3626e91..6e8eb2e 100644 --- a/frontend/src/api/frontApis.ts +++ b/frontend/src/api/frontApis.ts @@ -16,6 +16,13 @@ import type { const API_BASE_URL = import.meta.env.VITE_FRONT_API_BASE_URL?.trim() || "http://127.0.0.1:8500"; +// Log which backend the frontend is targeting on startup, with file + line hint. +// This runs once when the module is loaded. +// eslint-disable-next-line no-console +console.info( + `[frontend] Using FRONT_API_BASE_URL=${API_BASE_URL} (src/api/frontApis.ts:16)` +); + async function fetchJson(path: string, init?: RequestInit): Promise { const response = await fetch(`${API_BASE_URL}${path}`, { headers: {