Skip to content

Commit

Permalink
disable bodyParser in next api route when running on node js
Browse files Browse the repository at this point in the history
See honojs/node-server#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.
  • Loading branch information
Armster15 authored Apr 7, 2024
1 parent 953f400 commit 141cdeb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion getting-started/vercel.md
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 141cdeb

Please sign in to comment.