2

I'm trying to use coffeekup as my default template

app.set 'view engine', 'coffee'
app.register '.coffee', coffeekup.adapters.express

except app.register isn't a function it looks like. whats the migration?

dansch
  • 6,059
  • 4
  • 43
  • 59
  • I ended up creating my own 'loadDir' function, which loads a dir, runs it through a compiler, and either requires it or writes it to a new directory. In this case, I run it through the coffeecup compiler and stick it into a template object – dansch Oct 30 '12 at 17:52
  • use the npm module `loaddir` it is pretty awesome. – dansch Oct 07 '13 at 19:29

3 Answers3

2

coffeekup was Changed to 'coffeecup'

follow this link : https://github.com/gradus/coffeecup

LostCode
  • 533
  • 2
  • 6
  • 25
2

coffeecup derivative teacup has an up to date example

hurrymaplelad
  • 26,645
  • 10
  • 56
  • 76
0

You want app.engine instead of app.register -- the guide needs to be updated.

Check out the unit tests for examples: https://github.com/visionmedia/express/blob/master/test/app.engine.js

Eve Freeman
  • 32,467
  • 4
  • 86
  • 101