Files
yarmarka/templates/debug.html
2026-03-16 18:57:22 +03:00

28 lines
788 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Debug API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>Debug API</h1>
<button onclick="testApi()">Test API Connection</button>
<pre id="result"></pre>
<script>
async function testApi() {
const result = document.getElementById('result');
result.textContent = 'Testing...';
try {
const response = await fetch('http://localhost:8000/api/health');
const data = await response.json();
result.textContent = JSON.stringify(data, null, 2);
} catch (error) {
result.textContent = 'Error: ' + error.message;
}
}
</script>
</body>
</html>