Files
2025-03-27 05:04:22 -07:00

30 lines
573 B
TypeScript

import Hanzo from "hanzo";
export const runtime = "edge";
export const dynamic = "force-dynamic";
export async function GET(request: Request) {
const id = crypto.randomUUID();
const hanzo = new Hanzo({
publicKey: "pk-lf-1234567890",
secretKey: "sk-lf-1234567890",
baseUrl: "http://localhost:3000",
flushAt: 1,
});
hanzo.debug();
hanzo.trace({
id,
name: "example-nextjs-backend-route",
});
await hanzo.shutdownAsync();
return new Response(JSON.stringify({ id }), {
headers: { "content-type": "application/json" },
});
}