Created
June 28, 2011 04:03
-
-
Save donwb/1050464 to your computer and use it in GitHub Desktop.
slight bit of CoffeeScript to invoke a CoffeeKup view passing data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
express = require('express') | |
app = express.createServer() | |
# Setup Template Engine | |
app.register '.coffee', require('coffeekup') | |
app.set 'view engine', 'coffee' | |
# Setup Static Files | |
app.use express.static(__dirname + '/public') | |
# App Routes | |
app.get '/', (request, response) -> | |
response.render 'index', { mytitle: 'my express' } | |
# Listen | |
app.listen 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you need to add the
context
key to Line #13: