ANCHORGetting Started

In order to get started writing your first DerbyJS app, you need to have node.js, MongoDB and Redis installed. If you don't have those, get setup!

ANCHORRun Examples

There are several examples in the derby-examples repository. You can clone the repo and install:

git clone
cd ~/derby-examples
npm install

You can run each of the examples from their own directories:

$ cd ~/derby-examples/directory
$ node server.js

The examples written in CoffeeScript are meant to be run via the coffee command:

$ npm install -g coffee-script
$ cd ~/derby-examples/sink
$ coffee


If you want to start from a blank slate, generator-derby is a handy tool for creating a DerbyJS boilerplate.

# install yeoman
npm install -g yo
# install the generator
npm install -g generator-derby

mkdir myapp
cd myapp
# create a javascript based app:
yo derby
# or create a coffeescript based app:
yo derby --coffee


Be sure to check out the Docs to get a deeper understanding of how DerbyJS makes developing apps easier! See more links in the Resources section.


Introductory tutorials take you from getting started to a multi-player game.

Add authentication to a simple Todo app.


For Derby you need:

  • Node.js (>=0.10)
  • MongoDB
  • Redis (>=2.6) is optional (used to scale past one server process), but currently required to run examples.


We recommend installing node.js from the official site You can install mongodb and redis using homebrew

brew update
brew install mongodb
brew install redis


Same for all Debian family: Debian, Ubuntu, Mint, etc. For Node and Redis we will use the chris-lea repository, Mongo has an official repo.

# Add the repository
# node.js
sudo add-apt-repository -y ppa:chris-lea/node.js
# redis
sudo add-apt-repository -y ppa:chris-lea/redis-server
# mongodb
sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10
sudo echo 'deb dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list

# Update the apt-get
sudo apt-get -y update

# Set
sudo apt-get -y install nodejs
sudo apt-get -y install mongodb-10gen
sudo apt-get -y install redis-server


We currently recommend developing in a *nix environment. You can use a free VM like VirtualBox to run a Linux environment or tools like Vagrant or Docker.

Edit on GitHub