import fetch from "node-fetch"; async function testProjectAPI() { const baseURL = "http://localhost:3000"; console.log("Testing project API endpoints...\n"); try { // Test fetching project 1 console.log("1. Fetching project 1:"); const response = await fetch(`${baseURL}/api/projects/1`); console.log("Status:", response.status); if (response.ok) { const project = await response.json(); console.log("Project data received:"); console.log(JSON.stringify(project, null, 2)); } else { const error = await response.text(); console.log("Error:", error); } } catch (error) { console.error("Error testing API:", error.message); } } testProjectAPI();