Reputation: 67
I have a ReactApp that makes an axios request every 5 seconds.
I use the app from locohost when ever I need to use it I launch it with npm start.
But now I’ve been asked to host the app so it has a url.
My question is, If I host this react app with aws will it be making those axios request every 5 seconds indefinitely.
Or will it wait until someone searches the url before it comes alive.
Basically I want to know if
A user searching the url Is the equivalent of npm start
Upvotes: 0
Views: 52
Reputation: 38
In fact the axios request will be executed when someone access to you page because the react code is executed ony by the client side(Google chrome, Firefox etc) and not in some server in aws, actually AWS server just send html and js files to the client to be executed
Upvotes: 1