1
2
3
4
5
6
7
8
9
10
11
export const nhttpExample = async (request) => {
const { nhttp } = await import("npm:nhttp-land@1");
const app = nhttp();
app.get("/", () => {
return "Hello, World";
});
app.get("/cat", () => {
return { name: "cat" };
});
return app.handleRequest(request);
};