Has anyone got hono+nextjs+d1 working

Has anyone got hono+nextjs+d1 working together? i want to use this stack and deploy on cloudflare pages but wanted to know if i will jump into any bottlenecks so i can be aware of.
5 Replies
Zeeshan
ZeeshanOP6mo ago
i have setup my route using hono like this in my nextjs application, but I'm getting error
Detected default export in 'path_to/app/api/[[...route]]/route.ts'. Export a named export for each HTTP method instead.
Detected default export in 'path_to/app/api/[[...route]]/route.ts'. Export a named export for each HTTP method instead.
No description
James
James6mo ago
you need to export method like GET, POST, PATCH, etc. - you can't do a default export for a route handler
Zeeshan
ZeeshanOP6mo ago
oh okay, even if i want to deploy on cloudflare and not on vercel, i will have to export such methods?
James
James6mo ago
yes, it's how nextjs route handlers work
Zeeshan
ZeeshanOP6mo ago
oh gotcha thanks so much 👍
Want results from more Discord servers?
Add your server