Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JuanSerna14/Final-lenguaje-Avanzado/llms.txt

Use this file to discover all available pages before exploring further.

The /health endpoint provides a quick liveness check for the PitchPro backend. It requires no authentication and returns a JSON status object containing the current server timestamp. The endpoint is registered directly on the Express app instance (not behind any router or auth middleware), so it is always reachable as long as the Node.js process is running.

Request

GET /health
No headers, no request body, and no authentication token are required.

Example request

curl http://localhost:8000/health

Response — 200 OK

{
  "status": "OK",
  "timestamp": "2025-06-15T10:30:00.000Z"
}
status
string
Always "OK" when the server process is running and able to handle requests.
timestamp
string
ISO 8601 UTC timestamp generated by new Date() at the moment the request is handled. Use this to detect clock drift or stale cached responses.

Status codes

CodeMeaning
200Server is running. Response body always contains { status: "OK", timestamp: "..." }.
If the server is not running, the TCP connection will be refused or the request will time out — no HTTP response is returned.
The /health route is intentionally minimal. It confirms that the Node.js / Express process is alive and can respond to HTTP requests. It does not check database connectivity. For a database-level liveness probe, refer to the Swagger docs at GET /docs.

Dashboard usage

The React dashboard’s useHealth() hook queries this endpoint with TanStack Query on a polling interval. The StatCard component at the top of the dashboard displays “Operativo” with a green badge when this endpoint returns successfully. If the fetch fails (network error, timeout, or non-2xx response), the badge switches to a red “Sin conexión” state to alert the operator that the backend is unreachable.

API Overview

All PitchPro endpoints at a glance with base URL, auth format, and error conventions.

Dashboard

How the React dashboard consumes the health endpoint and displays the live status card.

Build docs developers (and LLMs) love