I deployed a django backend with fly, and it works as intended. I would like now to deploy a react app on fly, that will use this API. Is it something that can be done?
Generally, fly.io is geared toward full stack apps, so something like Next.js or Remix that uses a react client would be a good use case for the platform. In your case, a static hosting platform like Netlify would be best for hosting the React client. You’d need to make sure the react app on Netlify is pointed to the right IPv4/IPv6 address so it can make the proper API calls to your Django app on Fly. To do this:
fly ips allocate-v4 --sharedto allocate an IPv4 address for your django app hosted on fly.
- Set up a DNS only (no proxy) A name record pointing to the IP address generated from the first step
Hope that helps!
This could also be Django, Rails, Laravel, or Phoenix that uses a react client.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.