How to use Teacup templates in your Backbone app. Applicable to Rails and Node apps.
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
public
views
.gitignore
README.md
package.json
server.coffee

README.md

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

Prerequisites

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

Install

git clone git@github.com:goodeggs/teacup-backbone-example.git
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
node-dev server.coffee

The Examples

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.