Book Image

CoffeeScript Application Development Cookbook

By : Mike Hatfield
Book Image

CoffeeScript Application Development Cookbook

By: Mike Hatfield

Overview of this book

Table of Contents (18 chapters)
CoffeeScript Application Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Deploying our application to Heroku


Heroku is a popular cloud-hosting platform that is particularly suited for open source platforms, including Node, Ruby on Rails, and PHP. In this section, we will look at deploying our application to Heroku.

If you do not have a Heroku account, you can create a free account and follow along at the Heroku website at https://signup.heroku.com.

Getting ready

Heroku provides powerful command-line tools for Mac, Windows, and Debian/Ubuntu that allow us to easily work with our hosted application, any necessary add-ons, log files, and other tools.

To begin, install the Heroku toolbelt for your operating system. You can download the toolbelt from the Heroku website at https://toolbelt.heroku.com.

Our sample application is a very simple express website. We have an src folder with an app.coffee file with the following code:

express = require 'express'
cool = require 'cool-ascii-faces'

app = express()

app.set 'port', (process.env.PORT or 5000)
app.set 'views', __dirname...