Article Image
Article Image
read

What is Heroku?

Some of you may be wondering exactly what Heroku is. Basically Heroku is a cloud platform as a service. This allows developers build, deliver, monitor, and scale apps. Heroku is often regarded as the fastest way to go from idea to URL, whereby you do not have to worry about infrastructure; you just focus on your application.

Advantages/Benefits

There is no doubt that Heroku takes away all the pain of installing software, configuring servers, maintaining it, and monitoring the software — it takes care of most of the configurations for you. Other services could easily be added as add-ons.

Heroku Features:

  • Instant Deployment with Git push - build of your application is performed by Heroku using your build scripts
  • Plenty of Add-on resources (applications, databases etc.)
  • Security
  • Processes scaling — independent scaling for each component of your app without affecting functionality and performance
  • Isolation — each process (aka dyno) is completely isolated from each other thorough Documentation
  • Full Logging and Visibility - easy access to all logging output from every component of your app and each process (dyno)

Deploying your app in 7 steps

Here are some prerequisites you need to deploy your app:
  • Node.js and npm installed.
  • A Node.js app.
  • A free Heroku account.
  • The Heroku CLI.

Let’s get down to it!

  1. Login to your Heroku via the command line heroku login. This will prompt for your credential.

  2. Add Procfile to your application root directory touch Procfile
. Note: A Procfile is not necessary to deploy apps written in most languages supported by Heroku. The platform automatically detects the language, and creates a default web process type to boot the application server.
In the case of Node.js, it will start a default web process via the start script in your package.json.
Creating an explicit Procfile is recommended for greater control and flexibility for your app.

  3. Open your favorite text editor and place the following line inside your Procfile web: node index.js.
  4. Create Heroku remote repository heroku create appName
.
  5. Add the new changes made to the app git add.

  6. Commit the snapshot git commit -m “Added a Procfile.”
.
  7. Push to your app to the newly created heroku remote repository git push heroku master.

    That’s all there is to it! I hope this post has helped you!!

Blog Logo

Tanner Renshaw


Published

Image

Tanner's Blog

A Blog about the things I love.

Back to Overview