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.

已提問 1 年前檢視次數 80 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南