Howard86 / next-api-handler

lightweight nextjs api handler wrapper, portable & configurable for serverless environment
https://next-api-handler.vercel.app
Other
49 stars 1 forks source link

Next.js 13 with app folder? #96

Open Nicolab opened 1 year ago

Nicolab commented 1 year ago

Hello,

I have tested next-api-handler with Next 13 (app folder), but I have this error:

error - No HTTP methods exported in '/Users/nico/projects/example/src/app/api/auth/route.ts'. Export a named export for each HTTP method.

It's not compatible with Next.js 13 (app folder)?

Howard86 commented 1 year ago

sorry atm its not supported atm, feel free to open a PR think its an easy tweak but there might be some api changes in Next 13 app folder api route in the future)

https://next-api-handler.vercel.app/docs/getting-started#compatibility-with-next-js-13-2-api-routes