Now I get it. Dang. And btw does `/api` route work on Cloudflare? Or will it break? This is my `api

Now I get it. Dang. And btw does /api route work on Cloudflare? Or will it break?

This is my api/revalidate/route.ts
import { NextRequest, NextResponse } from "next/server";
import { getPosts } from "@/utils/apis";

export const GET = async (req: NextRequest) => {
    try {
        const posts = await getPosts();
        return NextResponse.json(posts, {status: 200});
    } catch (err: any) {
        return NextResponse.json({error: err.message}, {status: 500});
    }
};
Was this page helpful?