API Reference
Health Check
Endpoint to check API status
Health Check
Checks if the API is working correctly.
Endpoint
GET /api/healthParameters
No parameters required.
Request Example
curl -X GET http://localhost:3000/api/healthconst checkHealth = async () => {
try {
const response = await fetch('http://localhost:3000/api/health');
const data = await response.json();
console.log(data);
} catch (error) {
console.error('Error:', error);
}
};
checkHealth();import requests
def check_health():
try:
response = requests.get('http://localhost:3000/api/health')
response.raise_for_status()
print(response.json())
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
check_health()Response
Success (200 OK)
{
"message": "Good!"
}Status Codes
| Code | Description |
|---|---|
200 | API working normally |
This endpoint is useful for monitoring and health checks in production environments.