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.
You only need to have node installed. Everything else is installed as described below.
git clone git@github.com:goodeggs/teacup-backbone-example.git
cd teacup-backbone-example
npm install
npm start
open http://locahost:3000
With the server running...
npm test
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
node-dev server.coffee
The Backbone app itself is in public/javascripts/app
and is loaded by the entrypoint public/javascripts/app.coffee
.
Tests are in public/javascripts/test
.