Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

goodeggs/teacup-backbone-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

How to use Teacup templates in your Backbone app. Applicable to Rails and Node apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published