import { useState, useEffect } from "react"; interface HealthStatus { status: string; timestamp: string; } export default function App() { const [health, setHealth] = useState(null); useEffect(() => { fetch("/api/health") .then((res) => res.json()) .then((data: HealthStatus) => setHealth(data)) .catch(() => setHealth(null)); }, []); return (

Welcome to Your App

Edit src/App.tsx to get started.

API Status

{health ? (

Server is {health.status} (checked at{" "} {new Date(health.timestamp).toLocaleTimeString()})

) : (

Connecting to server...

)}
); }