Next.js + Cloudflare pages functions

I tried it myself but was a nightmare to work with, is there any guide or github repo i can follow to make it work?
5 Replies
James
James2w ago
What was the problem?
Dev
DevOP2w ago
when i run bun preview the apis inside the functions/api didnt work but if i run wrangler pages dev the frontend didnt load
James
James2w ago
Cloudflare doesn't list Bun as a supported option when using Wrangler. If you're using next-on-pages or OpenNext, the functions directory won't work
Dev
DevOP2w ago
im using next on pages, and i want to run both the frontend and the apis in functions dir with same command at same time
James
James2w ago
functions directory won't work with next-on-pages, you should use next.js api routes instead

Did you find this page helpful?