next(app router) + hono
Unanswered
astro posted this in #help-forum
astroOP
how to setup hono with nextjs app router?
/api/[[...route]]/route.ts
/api/[[...route]]/route.ts
import { Hono } from "hono";
import { handle } from "@hono/node-server/vercel";
const app = new Hono().basePath("/api");
app.get("/hello", (c) => {
return c.json({
message: "Hello!",
});
});
export const GET = handle(app);
export const POST = handle(app);