Skip to content

Commit

Permalink
use official method to handle vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
xizeyoupan committed Sep 25, 2023
1 parent 6bf840b commit 7a109fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 510 deletions.
3 changes: 2 additions & 1 deletion api/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import app from "../app.js"
import { handle } from '@hono/node-server/vercel'

async function writeReadableStreamToWritable(stream, writable) {
let reader = stream.getReader()
Expand Down Expand Up @@ -95,4 +96,4 @@ const getRequestListener = (fetchCallback) => {
}
}

export default getRequestListener(app.fetch)
export default handle(app)
Loading

1 comment on commit 7a109fe

@vercel
Copy link

@vercel vercel bot commented on 7a109fe Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.