S3 Amazon Static Website with reaction?

I built a website using ReactJs, and to see the website I usually do npm and go to localhost: 3000 through a browser.

Now I want to host this site on S3, but without an EC2 instance. I understand that npm is a process, therefore it is server-side, and therefore I will need to buy a calculation to actually deploy my website.

I found this tutorial that does not mention paying EC2 instance computation time: https://www.fullstackreact.com/articles/deploying-a-react-app-to-s3/

However, they still use NPM, which bothers me.

My question is: can I use React if I only use the Static S3 Website, without calculation, and if so, how can I get around the NPM process?

Reaction - component in a separate script does not work

In the above article, the user tried to get the hello-world application to respond, but all the responses indicate how the server will serve the content. I thought reaction was an interface and could work without server processes. It's true? Can someone explain why node.js is necessary or coupled with a reaction, and is it possible to use a reaction to s3 without calculating ec2?

+4
source share
2 answers

It is possible to host the entire static response node on s3. In this case, you should use node/ npmonly as build tools and start the development server ( localhost:3000).

npm , node gulp webpack .

s3, .

node, ec2 - . javascript, node.

, :

+3

! : https://www.gatsbyjs.org/

Github: " "

, S3, Github... !

+1

Source: https://habr.com/ru/post/1684850/


All Articles