// Test proxy connection const axios = require('axios'); async function testProxy() { console.log('๐Ÿงช Testing Proxy Connection...\n'); try { // Test through proxy (frontend dev server) console.log('1. Testing through Vite proxy...'); const proxyResponse = await axios.get('http://localhost:5173/api/health'); console.log('โœ… Proxy Health Check:', proxyResponse.data); } catch (proxyError) { console.log('โŒ Proxy test failed:', proxyError.message); // Test direct connection console.log('\n2. Testing direct connection...'); try { const directResponse = await axios.get('http://localhost:3000/api/health'); console.log('โœ… Direct Health Check:', directResponse.data); console.log('๐Ÿ’ก Backend is running, but proxy might have issues'); } catch (directError) { console.log('โŒ Direct connection also failed:', directError.message); console.log('๐Ÿ’ก Make sure your NestJS backend is running on http://localhost:3000'); } } } testProxy();