Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
If you haven't yet, install the
> npm install -g toffee
In Express 3.x to make it your default engine:
app.set 'view engine', 'toffee'
In Express 3.x to use it just for .toffee files:
toffee = require 'toffee' app.engine 'toffee', toffee.__express
Using a "layout", the Express 2 way.
Yes, this works. If you publish a file
foo.toffee and pass a
layout filename to it as a var,
foo.toffee is rendered, and the results are put into
a var called
Inside your layout file, to print the body, do this: