Home > Net >  How to host a Spring Boot Application (backend) and React Application (frontend) on AWS?
How to host a Spring Boot Application (backend) and React Application (frontend) on AWS?

Time:07-12

I am a beginner in AWS and want to host a website whose backend is on Spring on frontend on React. I think we have to do it by using EC2 instances, my senior mentioned it. Any help at all is appreciated. Right now in my react application, the data submitted by the user is being sent to localhost:8080 where my spring boot application is hosted. I think I'll have to host these 2 applications separately and follow the same procedure.

CodePudding user response:

Here is an AWS tutorial that walks you through this use case. The Front end is a React App that sends requests to a Spring Rest Backend that returns JSON.

enter image description here

To learn how to deploy a Spring App on Elastic Beanstalk, see the section titled Deploy the application to Elastic Beanstalk in this tutorial.

https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/usecases/creating_first_project

All of the information you need to get this use case working is in these 2 articles.

CodePudding user response:

Take a look at the workshop for Web application Development with AWS Elastic Beanstalk. You will learn how to deploy a React frontend and a Node.js backend. Since you want to use Spring Boot for your backend, adapt that part of the workshop by applying what you learn in this step-by-step guide Deploying a Spring Boot Application on AWS Using AWS Elastic Beanstalk.

  • Related