Skip to main content
import * as BunnySDK from "https://esm.sh/@bunny.net/[email protected]";

BunnySDK.net.http.serve(
  async (request: Request): Response | Promise<Response> => {
    const data = {
      weather: "sunny",
      temperature: 27,
      windspeed: 0,
      uvindex: 7,
    };

    const json = JSON.stringify(data);

    return new Response(json, {
      headers: {
        "content-type": "application/json",
      },
    });
  },
);