18 May 2021, Abdulhakim Altunkaya

People starting to learn coding first ask how to put javascript into their HTML/CSS website. Then as we move, we started to realize a “back-end” of the websites, and ask this question again this time for node.js, php or python. After spending sometime on localhost on your computer, it’ll be time to move on to real servers.

You cannot just grab your node.js file and drop it in your website directory. You'll need service from node.js hosting companies. Some of those companies:

Microsoft Azure
Google Cloud
Amazon Web Services

So, you can go ahead and create an account with one of them. Personally, I advice Microsoft Azure or Heroku. Of course, start with the free plan.

For example, 1) I have created a simple node.js based website code, 2) I have uploaded this to my github account, 3)From my github account I uploaded the files to my Heroku account (You can connect your github account to your heroku account on heroku settings. Then create a project in heroku and in settings of this project, choose the relevant project on your github profile projects. Then connect them and select auto-deploy). Check if your project is working on heroku. Then 4) I have bought a domain name from namecheap and I pointed this domain name to my heroku app by dns pointing. You probably don't know how to do this. This video will help.