I am developing application with MERN stack.
- Can I deploy the client and server code separately?
- What AWS services should I use for the client and server?
- What else I need to think about?
CodePudding user response:
- Yes you can
- You can deploy react using amplify and you can use elastic beanstalk for node. You can also use an ec2 instance to deploy your node application. You can even add react to ec2 but keeping it separately deployed should be better.
- You would connect your frontend and backend using APIs. So when you deploy correct domain names need to be added. You would also need to enable CORs in your backend for your frontend domain.
There might be other issues that might run into like opening correct ports (especially if you use ec2), accessing the application from internet etc. I would suggest you deploy the applicaton stepwise making sure each step works before moving on. For example, your backend apis are reachable on their own before you connect frontend with it