You asked a difficult question. I think I can make it bit easy for you.
First let's look at the differences in the options.
Serving the front end app
Option1: Django to serve
In this option, the Django app will serve your app in a route for e.g
/app/. Basically the route
/app will load react app's index.html. it's that simple.
In order for this to work, you need to build your react app using
npm run build and copy the files to Django's static folder. good so far?
One of the benefits option 1 gives, option 2 doesn't is, you can use the same domain for backend and frontend for e.g
Option 2: deploy front end in S3
You still need to build the react app using
npm run build, but you will not copy that to Django, in other words, you don't want to Django to serve your front end app, you want s3 to serve the static website. this method requires a separate subdomain or domain to host the react app.
Thats is the only difference between the options. Your frontend app will make api calls to the Django api, thats same for both options.My preferred option is option 2 to reduce complexity.
I would pick elasticbeanstalk because it's easy to start with. You can do everything in the elasticbeanstalk console from load balancer to SSL, Healthcheck, Changing EC2 Keypair for EC2 Instance etc. Deployment is very easy. It supports multiple environments, You can use one AWS account for your test and production environments.
- How to Deploy Django Rest Framework and React on AWS
- How to upload image to aws s3 using react and django rest framework
- How to use Django User Groups and Permissions on a React Frontend with Django Rest Framework
- Django Rest Framework and React Front End: How to prevent unauthorized users from viewing private images if they get a hold of the image URL?
- How to implement autocomplete user search in React and Django Rest Framework
- how to deploy react as frontend and drf (django rest framework) on same server( Digitalocean or aws )
- How to upload file to Django rest framework API using Axios and react hook form?
- How to show my reset password page in React using Django Rest Framework and Dj-rest-auth
- How to send CSRF Cookie from React to Django Rest Framework with Axios
- how to display large list of data using reactJS as frontend and django rest framework as backend
- How to configure Django Rest Framework + React
- How do I authenticate users with Django REST framework and React.js frontend?
- How to implement pagination in a Django and React app without using the REST framework?
- How to send FormData attribute with an array of strings from React Client to Django + Django Rest Framework API
- Authentication with React and Django REST Framework
- How can I get Django Rest Framework to work with Django Tenants and React?
- How to insert data in child table from react to django rest framework models
- How to access a Django rest Framework API from React
- how to send data in GET request header using react and axios to Django rest framework?
- Django Rest Framework + React - token vs session authentication
- Standalone REST API & Standalone React SPA vs Django and React combined
- How to properly handle unauthenticated users and requests in AWS Amplify/AppSync React apps?
- how to deploy successfully React app with nextjs to AWS Amplify?
- Folder structure for React and Django REST
- deploy React and Django with Nginx and Docker
- React Django REST framework session is not persisting/working
- cannot upload files to django rest framework using react js
- Deploy both django and react on cloud using nginx
- How to Deploy Strapi and React at one hosting?
- How to create and deploy a React App properly?
More Query from same tag
- errno: 1452, sqlMessage: 'Cannot add or update a child row: a foreign key constraint fails
- Mobile Safari skips first seconds of HTML Audio on play()
- What is the most efficient way to toggle between two components React JS?
- How can i pass a boolean state in reactjs with typescript
- search filter is not working properly in reactjs
- Can I Change Box background color on click in material ui with typescript?
- How to close the parent dialog once the child dialog opens, using Material UI React
- How to fix CORS error with credentials: include?
- Enzyme form onsubmit is not getting called
- Why "TypeError: Cannot read property 'airline' of undefined" when it is defined?
- Perfect Scroll bar error no element is specified to initialize PerfectScrollbar on windows
- Accessing a nested key inside reducer
- how to bundle react to one big bundle with css + js
- How do I check if the user clicked inside the current component?
- Import json file in node.js(Express) and export to index.jsx(React)
- Unable to access token using react hooks
- Is there an way to wait for event that trigger async function in Jest/Enzyme?
- using redux and redux-persist in react app: after submitting the form, store create a new and empty object
- Run some code only after fetch statements inside of loops have finished executing
- Can I use reactJS library in react-native?
- Hide React button after it is clicked
- Handling multiple inputs in React
- How to remove a specific component in React? (Using key and id)
- What exactly is Dynamic Routing in ReactJS
- godaddy cPanel React - new page showing 404
- defaultValue of Input not working correctly on ant design
- How would you compare two arrays and filter between the two arrays?
- React convert function to class and call variable from function to class
- React Images Won't Load when I pass my src value through array