export default async function main(req: Request): Promise<Response> {
const apiUrl = "https://api.open-meteo.com/v1/forecast?latitude=40.6782&longitude=-73.9442&hourly=temperature_2m¤t_weather=true";
const response = await fetch(apiUrl);
const weatherData = await response.json();
return new Response(JSON.stringify(weatherData), { headers: { "Content-Type": "application/json" } });
}