<commit_before>---
layout: post
title:  "Easy Continuous Deployment: Node/Express App on Heroku"
date:   2015-10-17 14:30:00
categories: javascript
---

In this post, I'm going to run through the quickest and easiest steps to deploy your Node/Express app on Heroku and setup continuous deployment from your github repo.

First things first, this article assumes that you already have the following set up:
- A working (more or less) Node/Express project
- A github account
- A github repo for the project that you want to deploy
- A Heroku account
- A desire to spend as little time as possible on deployment


###Setup
#####Create a New Heroku App
The first thing that you're going to want to do is create a new app on heroku. You can think of this as the heroku equivalent of the github repo for your project. Just click the `+` button at the top-right corner of your dashboard and then `Create New App`.

![Alt text](../assets/images/heroku-new-app.png)

#####Procfile
You're also going to need something called a Procfile, which tells Heroku how to build your app. In this case, we just need to create a file called `Procfile` (no file extension, this will only cause you woe and suffering) in the root directory of our project and put the following line in it:
  
    web: node index.js

Save it but don't commit and push yet, there's still a little more to do...

#####Environmental Variables<commit_msg>fix image link<commit_after>---
layout: post
title:  "Easy Continuous Deployment: Node/Express App on Heroku"
date:   2015-10-17 14:30:00
categories: javascript
---

In this post, I'm going to run through the quickest and easiest steps to deploy your Node/Express app on Heroku and setup continuous deployment from your github repo.

First things first, this article assumes that you already have the following set up:
- A working (more or less) Node/Express project
- A github account
- A github repo for the project that you want to deploy
- A Heroku account
- A desire to spend as little time as possible on deployment


###Setup
#####Create a New Heroku App
The first thing that you're going to want to do is create a new app on heroku. You can think of this as the heroku equivalent of the github repo for your project. Just click the `+` button at the top-right corner of your dashboard and then `Create New App`.

![Alt text](http://dougshamoo.com/assets/images/heroku-new-app.png)

#####Procfile
You're also going to need something called a Procfile, which tells Heroku how to build your app. In this case, we just need to create a file called `Procfile` (no file extension, this will only cause you woe and suffering) in the root directory of our project and put the following line in it:
  
    web: node index.js

Save it but don't commit and push yet, there's still a little more to do...

#####Environmental Variables
{'fraction_non_alphanumeric': 0.06690140845070422, 'fraction_numerical': 0.009859154929577466, 'mean_word_length': 3.9842105263157896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6738707', 'n_tokens_mistral': 793, 'n_tokens_neox': 733, 'n_words': 451}