Can I connect a NextJs frontend worker to a Hono backend worker without backend worker URL?
If so, how do I go along doing that?
1 Reply
👋 Next.js has a frontend that lives in the client, this can not connect to your Hono API without DNS resolution. However, the Next.js server can run on a worker and connect to another worker in the same Cloudflare account without any external routing / DNS.
To connect the Next.js server to a Hono API via a service binding try this in your Next.js server-side code...
wrangler.jsonc
your-nextjs-server-code.js