How Do I Properly Upload A Localhost Website Online?

- 1 answer

I have a ReactJS project for my Front and a NodeJS project/server using Express for my back. My Front depends on my Back because for example in the Login part, I ask the server if the user is already in our database.

To execute my project, I just open 2 terminals and do npm start in each Front and Back.

I know that in order to upload a website with a personal domain name, I should:

  1. Buy a domain name
  2. Pay a subscription to a web-hosting website like GoDaddy, Bluehost, Hostgator etc.

If I pay a subscription to some web-hosting website, will I be able to put my Front AND Back? I have seen some tutorials online and people just make a simple HTML/CSS/JS website and upload it. I never see anyone uploading their own Server and making requests to it.

I'm not asking to merge both my Front and Back. I want to know how do people upload online their React front and Node Server online, for them to be always executed and talking to each other. I just can't see the relationship and explanation on how uploading both.



Your react frontend doesn't really need a server, you'd need to build a release bundle and that can be served from any static filehoster. For your backend though you need a node.js hoster like AWS or heroku, follow their tutorials to upload your project.

You could also then serve both from the same hoster and read into connecting frontend and backend like mentioned by @FedeSc