S3 Amazon Static Website with React?
It's possible to host a static react site entirely on s3. In this case, you would use node
/npm
only as build tools and to run your development server (localhost:3000
).
npm
would download your dependencies and you'd use node or gulp or webpack to build the assets into static files.
Then you would upload the files to s3 where it would serve the static files.
If you have some backend node code, then you would need to use ec2 or some other type of host. But if it's entirely static javascript, then there's no need for a node server.
Here are some links that might help explain in more detail:
- https://medium.com/@omgwtfmarc/deploying-create-react-app-to-s3-or-cloudfront-48dae4ce0af
- https://www.fullstackreact.com/articles/deploying-a-react-app-to-s3/