2011-07-26 13 views

cevap

20
var _ = require('underscore'); 

app.register('.html', { 
    compile: function (str, options) { 
    var template = _.template(str); 
    return function (locals) { 
     return template(locals); 
    }; 
    } 
}); 
+0

Not sonra https://github.com/haraldrudell/uinexpress

npm install uinexpress 

: Bu ifade içindir <3 – UpTheCreek

4

Şimdi Express 3.0 ile biraz farklı. Kolay çözüm:

app.configure(function() { 
app.engine('html', require('uinexpress').__express) 
app.set('view engine', 'html') 
+0

Başparmak yukarı, bu benim için çok çalıştı –