简体   繁体   中英

Deploying a React App to AWS

I have a website using express/ react which consist of two separate parts. 1- API app (express server) 2- Website (react app)

I was fiddling around with AWS to deploy my app and figured out few options. So far the best option for the API is to use Elastic Beanstalk. It works well and I had no issues with it.

The confusing part is the react app. I have deployed it once as Elastic Beanstalk and once as S3 bucket. Both worked with some challenges ( easier was the S3)

I want to ask if anyone has been in the same scenario and have any recommendations?

In my experience it is better (for the sake of better scalability) to split the API server and CDN for bundled React App. You can use the CloudFront as CDN for the App and EC2 as API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM