Simple native or client side java script can run on browser session can give us the desired output. This can be run either directly on browser if we have all the code on our machine or may be host it on github and can be accessed everywhere without needing to have code on our local machine
Github can only run client side javacript code but if we have server side javascript then we may need to use service providers such as heroku/AWS/Google/Azure to run our application
Server side coding is done for more complex applications and also not to expose our entire code to the rest of the world
For our code to be deployed following are the steps
- create. a Procfile with same naming convention and add the following line web: node index.js. This will help the heroku to identify what is the staring JS file on which the code should be run
- git init
- git add .
- git commit -m "version name"
- heroku create app name . This is to give a specific app name or else heroku would create a name for our application
- git push heroku master
Thats it now our application can be accessed via heroku
I had a look at the details that you mentioned in the content regarding How to Push Node Js code into Heroku and I believe that the content mentioned in the blog is very description and knowledgeable. I must recommend everyone to read this.
ReplyDeleteI was searching for Node js development company and found your blog.
Synsoft Global
Thanks for sharing such a great blog.