Over the years we had talked a lot about Nodejs. Nodejs is easy to get started developing, as well it is easy to host a Nodejs application. In this post, we will cover different options available to host Nodejs applications. We will deploy our demo project on those services. Let's get started.
Free Nodejs Hosting
There are 100s of services out there that allow users to host Apache MySQL and PHP (AMP) applications. PHP and JavaScript used to work together since the dawn of the web. JavaScript handled little details on the browser, while PHP managed all the server-side tasks.
Now With the introduction of Node.js, javascript can work alone, but not all hosting provider supports Nodejs, like PHP. It does not mean, there are none. Not just hosting, but we got free hosting as well for Nodejs. These services are free, signup and start deploying the applications. No need to verify you have credits cards to pay later.
Heroku
Let's deploy our Node project on Heroku. For this demo, we will use a Demo project. This demo was used during Nodejs Deployment with SSL certificate, where we deploy the project on an ubuntu server.
To get started, create an account with Heroku. Once you log in to Heroku, you will be on the Heroku dashboard. To deploy a new application, click on New and click on create new app.
Now Enter the App name, and choose a region. Then Click on Create app.
Now you will be on the Deploy section of your application, if you moved around click on the Deploy tab once you select your application for the dashboard.
For this demo purposes, we will deploy the application from Github. On the Deployment methods click on Github. Then click on Connect to Github Button.
Once you connect your Github, now you can search for the repo on your project. Now search for the application and click on Connect.
Now you can choose the branch you want to deploy. Then you can Enable Automatic deploy, which will deploy the changes once you pushed the changes to that branch.
Now on manual deploy click on Deploy Branch to deploy your application. Now you should get "Your app was successfully deployed." Click on view, you should see your application.
That's it, You successfully deployed your Nodejs Application on Heroku.
Conclusion
Posted by Sagar Devkota
0 Comments