Spaces:
Sleeping
Sleeping
Caner Giden commited on
Refactor fetch URL and clean up JSX formatting
Browse files1 unmodified line23456756782 unmodified lines111213161418192021222324252615161729183132192021221 unmodified line let health: any;
try { const res = await fetch("http://localhost:7860/api/core/health", { cache: "no-store", }); const res = await fetch("/api/core/health", { cache: "no-store" }); health = await res.json(); } catch (e: any) { health = { error: e?.message ?? "fetch failed" };2 unmodified lines return ( <main style={{ padding: 24 }}> <h1>ForgeFlow Studio</h1>
<p>Core health check:</p>
<pre style={{ background: "#111", color: "#0f0", padding: 16, borderRadius: 8, }} > <pre style={{ background: "#111", color: "#0f0", padding: 16, borderRadius: 8 }}> {JSON.stringify(health, null, 2)} </pre>
<p> Eğer burada <code>db_ok: true</code> görüyorsan Studio → Core bağlantısı tamam. Eğer burada <code>db_ok: true</code> görüyorsan Studio → Core bağlantısı tamam. </p> </main> );app/page.tsx+3-16