Book Image

Heroku Cookbook

By : Mike Coutermarsh
Book Image

Heroku Cookbook

By: Mike Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (17 chapters)
Heroku Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up a sample blogging app


In this recipe, we will set up a simple blogging application that we'll use throughout the rest of the chapter. It's a simple Rails application that has had no performance enhancements. With each recipe in this chapter, you'll learn different ways to make it faster.

Note

Completed code samples for each recipe are available in the separate branches of the project's GitHub repository at https://github.com/mscoutermarsh/blogger-app.

How to do it…

Here, we will get the example application up and running on your local machine. We'll then deploy it to Heroku. Let's begin by opening up a terminal using the following steps:

  1. First, we'll need to get a copy of the source code by cloning the Git repository:

    $ git clone https://github.com/mscoutermarsh/blogger-app.git
    
  2. Next, let's navigate to the new directory and install the application's gems:

    $ cd blogger-app
    $ bundle install
    

    Note

    This application uses a Postgres database; if you do not already have Postgres installed on...