How to use Teacup templates in your Backbone app. Applicable to Rails and Node apps.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Using Teacup with Backbone - an example app

This app runs a node server with Express and connect-assets to serve a basic Backbone.js app that demonstrates how to use Teacup in your Backbone apps.

Express serves up the one HTML page and connect-assets compiles and combines the JavaScript and CSS, very similarly to Rails and it's asset pipeline. If you're already using Rails and Backbone, you should be able to use Teacup exactly as demonstrated in this app.

Getting Started


You only need to have node installed. Everything else is installed as described below.


git clone
cd teacup-backbone-example
npm install

Start the server

npm start
open http://locahost:3000

Run the tests

With the server running...

npm test

Reloading Changes

If you want to see changes to files without having to restart your server, start the app with node-dev:

npm install -g node-dev

The Examples

The Backbone app itself is in public/javascripts/app and is loaded by the entrypoint public/javascripts/

Tests are in public/javascripts/test.