docs(production): standardiserad produktionsberedskap och gap-analys
Lägger docs/production-readiness.md och siax/production-gaps.json enligt SIAX Master Definition of Done. Underlag: git-, kod- och live-evidens 2026-11-11. Nivån är evidensbaserad, inte ett leveransgodkännande.
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
// Bridge from the Vercel edge (Next route handlers) to the FastAPI data engine
|
||||
// (services/api) running on the VPS. When ENGINE_URL is set, the edge defers to
|
||||
// the engine as the single source of truth; otherwise it computes locally.
|
||||
export function hasEngine(): boolean {
|
||||
return Boolean(process.env.ENGINE_URL);
|
||||
}
|
||||
|
||||
export async function engineFetch(path: string, init?: RequestInit): Promise<Response | null> {
|
||||
const base = process.env.ENGINE_URL;
|
||||
if (!base) return null;
|
||||
try {
|
||||
return await fetch(`${base}${path}`, {
|
||||
...init,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Internal-Token": process.env.INTERNAL_TOKEN ?? "",
|
||||
...(init?.headers ?? {}),
|
||||
},
|
||||
cache: "no-store",
|
||||
});
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user