问题
I am using react-router so I want to host in AWS Ec2. How to deploy the app and run permanently in the background or let me know if any other way
回答1:
You can use Amazon S3.
Do npm run build in your local instance.
Upload the files to S3 bucket instance.
Static website hosting can be chosen.
https://s3.console.aws.amazon.com/s3/buckets
回答2:
https://medium.com/@spiromifsud/deploying-an-amazon-ec2-build-server-for-reactjs-with-jenkins-and-github-3195d2242aae
I deployed my app on EC2 with the help of the above mentioned link. This link also helped -
https://medium.com/@sgobinda007/setting-up-react-redux-application-for-production-and-hosting-in-aws-ec2-8bbb8bf3c643
来源:https://stackoverflow.com/questions/50250307/how-to-deploy-create-react-app-in-aws-ec2