From 141cdebbd5a79ff2caf5ddcc375497abf4924b34 Mon Sep 17 00:00:00 2001 From: Armaan A <49625265+Armster15@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:25:27 -0700 Subject: [PATCH] disable bodyParser in next api route when running on node js See https://github.com/honojs/node-server/issues/84 Based on manual testing, this only affects the Node js runtime on the pages router: the app router as a whole and edge API routes in the pages router are unaffected. --- getting-started/vercel.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/getting-started/vercel.md b/getting-started/vercel.md index 339c2c89..2ea8244e 100644 --- a/getting-started/vercel.md +++ b/getting-started/vercel.md @@ -152,8 +152,13 @@ Next, you can utilize the `handle` function imported from `@hono/node-server/ver ```ts import { Hono } from 'hono' import { handle } from '@hono/node-server/vercel' +import type { PageConfig } from 'next' - +export const config: PageConfig = { + api: { + bodyParser: false, + }, +} const app = new Hono().basePath('/api')