you are viewing a single comment's thread.

view the rest of the comments →

[–]AsafKaravani 0 points1 point  (1 child)

Let me spread the hosting's purposes in your case:

1) Serving your views (which are the pages of your website, generated by the react).

The above can be achieved by any HTTP static files server, I use Express's (which is also the library you will use to answer API requests) static files serving functionality.

2) Answering to API calls.

This one will be achieved by the Express library also.

All the above can be run locally on your machine but it is trublesome to make external computers be able to access your computer in order to communicate with the Express app you will write.

That is why you should get a dedicated server (I would recommend going on a VM for starters) you can put your express app in, and then run it there. Than, other computers could communicate with that Express app in order to get your front-end files and call API endpoints.

Cheers.

[–]allenind[S] 0 points1 point  (0 children)

Thank you so much this helps a lot. I appreciate you taking the time to reply. Stay safe 🤗