Serve two react applications with a single sst backend and have two different custom domains point to each react app

0

I am trying to serve two react applications with a single sst backend and have two different custom domains point to each react app.

Is this possible? If so can someone please point me in the right direction in terms of what I need to do to accomplish this?


I just asked chatGPT, which gave me this answer, I'll be going with this solution unless someone knows of a better way.

-- ChatGPT:

Yes, it is possible to serve multiple react applications with a single backend in Amazon Web Services (AWS). You can use Amazon's Elastic Load Balancer (ELB) to handle the incoming traffic to your backend and route the traffic to the correct application based on the domain name.

Here's one way you can set this up:

Create two react applications and host them on Amazon's Elastic Container Service (ECS) or Elastic Beanstalk. Create an Elastic Load Balancer and add your two applications as targets. Configure the load balancer to use host-based routing, which allows you to route traffic based on the host name in the request. Add a listener to the load balancer for each of your custom domains, and specify the target group for each listener. Update the DNS records for your custom domains to point to the load balancer. Now, when a request is made to one of your custom domains, the load balancer will route the request to the appropriate react application based on the domain name in the request.

asked a year ago77 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions