Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Weapon of Choice

This app implements Backbone.js's TODO example app with MongoDB and either Sinatra or Node.js as a backend.

  1. HTML5 Boilerplate -
  2. Backbone.js -
  3. Sinatra -
  4. HAML -
  5. Node.js -
  6. Express -
  7. Mongoose -
  8. Jade -
  9. MongoDB -

Obviously, you don't need both the Node.js and Sinatra backends. You can pick one and delete the other.

To Run

Make sure that you have installed (and are running) MongoDB.

By default, the app connects to MongoDB running on localhost with its default port.


Make sure that you have bundler and Ruby installed.

git clone git://
cd weapon-of-choice
bundle install
ruby app.rb

Visit http://localhost:4567

Node.js / Express

Make sure that you have Node.js installed.

git clone git://
cd weapon-of-choice
node app.js

Visit http://localhost:3000



HAML/Jade files should be created in the views folder.

All of the current layout.haml/layout.jade is straight out of HTML5 Boilerplate.


All of the CSS is from HTML5 Boilerplate, except for the TODO css, which is marked with:

 * Delete below. This is the Todo app's css.


 * Delete above. This is the Todo app's css.


I've dumped the Backbone.js and Underscore.js libs inside the public/js/mylibs folder. This is, again, just HTML5 Boilerplate layout.


There is still a little CSS weirdness. The (x) button in the "real" Backbone.js TODO demo doesn't appear. I'm pretty sure this has to do with a fight between HTML5 Boilerplate, and the copy/pased CSS for the Backbone.js TODO app.

It would be pretty cool if the Backbone.js and Mongoose models were actually the same class. I need to figure out how to do this.