managarten/apps-archived/techbase/apps/web/public/debug.js
Till-JS 34c879929b chore: add techbase to apps-archived
Integrated techbase (software comparison platform) into monorepo structure:
- Created NestJS backend with votes and comments modules
- Migrated from external Supabase to own PostgreSQL
- Set up Drizzle ORM schema for votes and comments
- Created API client replacing Supabase in Astro frontend
- Added environment configuration (port 3021)

Archived immediately as it's not yet ready for active development.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:47:39 +01:00

33 lines
No EOL
963 B
JavaScript

// Debug-Hilfsfunktionen
console.log('Debug-Tools geladen');
// Listener für fetch-Anfragen
const originalFetch = window.fetch;
window.fetch = function(...args) {
console.log('Fetch Request:', args[0], args[1]);
return originalFetch.apply(this, args)
.then(response => {
if (!response.ok) {
console.error('Fetch error:', response.status, response.statusText, response.url);
}
return response.clone()
.text()
.then(text => {
try {
const data = JSON.parse(text);
console.log('Fetch Response:', data);
} catch (e) {
console.log('Fetch Response (nicht-JSON):', text.substring(0, 500));
}
return response;
})
.catch(err => {
console.error('Error parsing response:', err);
return response;
});
})
.catch(error => {
console.error('Fetch failed:', error);
throw error;
});
};