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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ