I recently posted a video on Studytonight's Instagram talking about Heroku. If you are a beginner app/website developer and looking for good cloud services to host your application. But you do not have much idea about managing servers and various related services, then Heroku is for you.
Heroku is a cloud service provider that you do not have to manage. Yes, Heroku is a managed cloud service provider, so you just have to focus on application development.
View this post on Instagram
In this video I have covered a brief introduction to Heroku service, which is a PaaS (Platform as a Service) used to host websites, applications, etc., with all the services completely managed by Heroku. . . Follow @study.tonight for more such videos. . . . #heroku #webdeveloper #webdevelopment #appdevelopment #appdeveloper # apphosting #webhosting #programming #application #applicationdevelopment #serverlife #server #devops
To get started with hosting your website or application on Heroku, you first need to install the Heroku CLI on your computer.
For Mac, you can use Homebrew to install Heroku CLI, just run the following command:
brew tap heroku/brew && brew install heroku
For Ubuntu and Windows OS, follow this link: Install Heroku CLI.
Once you have the Heroku CLI installed, you can use the
heroku login command to login to Heroku. Run the following command, and you will be taken to the browser to login there:
heroku: Press any key to open up the browser to login or q to exit
› Warning: If browser does not open, visit
heroku: Waiting for login...
Logging in... done
Logged in as [email protected]
You can also login using the CLI too by using the
-i flag with login:
heroku login -i
once you have logged in, you can create your first Heroku app.
To create your Heroku app, go to the GIT repository in which you have your application code, and then run the following command:
Creating app... done, ? white-grassland-51243
https://white-grassland-51243.herokuapp.com/ | https://git.heroku.com/white-grassland-51243.git
Heroku automatically creates an empty application and assigns it a random name like white-grassland in this case.
Heroku is integrated with Git and Github, so if you have a Git repository then you can use the git push command to push the code to Heroku to run your application or if you have your Git repository hosted on Github, then you can directly use the Heroku dashboard to configure your Github account and the Github repository.
When we run the
heroku create command from within a git repository, then Heroku will automatically create a new remote with the name of heroku and then we can run the
git push command to push the code to Heroku server.
git push heroku master
For more information, checkout the Heroku Getting Started Guide for different programming language guide.
With this, I think now you should have a good enough idea to start using Heroku. Heroku free tier service can be used to test-run applications immediately and after 30 minutes of no use, it is automatically destroyed.
You can also explore the pricing of dyno if you want to host your business website or application.