Created: 2011-07-17 04:27
Updated: 2014-02-07 21:19

Environment Setup


I am running the latest stable version (0.4.9), but Heroku currently supports 0.4.7. I don't think we will run into major trouble if you also install the latest stable.

With Homebrew (recommended):

$ brew install node

Otherwise, download the zip from and follow installation instructions.


npm is a simple install:

$ curl | sh

I am running 1.0.15, which I think is what you'll get with that:

$ npm -v

The app's node dependencies are declared in the package.json file. With the new version of npm, dependencies can be installed locally to the project, which is recommended (in /node_modules). However, this folder is added to .gitignore and will not be committed. To get any dependencies which may have been added to the package.json and are not installed locally, just do

$ npm install

All dependencies declared in package.json and not available on your local system will be installed.


foreman is required to run our app locally like it will be run on Heroku.

$ gem install foreman

In a directory with a proper Procfile, you can run

$ foreman start

to start the application.


If you don't have the heroku gem, or haven't updated it in a while, you should:

$ gem install heroku
$ heroku version

Environment Setup

Application expects an environment variable is setup pointing to the location of where CouchDB can be accessed. This is set by the following command:

$ export CUBS_DB='http://localhost:5984'

The application will throw an error on startup if this variable is not present.

Database Setup

Once the database is up and running, you can utilize helper files to setup the database and the corresponding views that are needed.

From command line, run the following inside your project directory:

$ node servers/db/init.js

That should create the database and setup the views that are under 'servers/db/views/'.


For express views, jade is used.

More information

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more