New Tutorials:   TKINTER    KOTLIN    JAVASCRIPT    SASS/SCSS    PL/SQL    Matplotlib    C++ Programs
CLOSE
   Heroku  Web Hosting  Application Hosting  
   Technology    Cloud

What is Heroku? Getting Started Guide for Beginners!

         
 AUGUST 3, 2020   by iamabhishek

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.

What is Heroku?

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.

Getting Started with Heroku

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.

Login to Heroku:

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 login


heroku: Press any key to open up the browser to login or q to exit
› Warning: If browser does not open, visit
› https://cli-auth.heroku.com/auth/browser/***
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


heroku: Enter your login credentials
Email: [email protected]
Password: ***************
Two-factor code: ********
Logged in as [email protected]

once you have logged in, you can create your first Heroku app.

Create 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:

heroku create


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.

Conclusion:

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.


RELATED POSTS



Subscribe and receive amazing posts directly in your inbox.