I was trying what I've seen in other questions with no luck:
I tried to override the default engine configuration with
app.register('.js.html', {
compiler: function(str,options){...}
});
but register is undefined in express js.
I got Bliss working this way
exports.index = function(req, res){
//res.render('index', {});
res.send(bliss.render(__dirname+"/index",{}));
};
but I'd like to use res.render('index',output) instead.
You have to set it up this way:
var Bliss = new require('bliss');
var bliss = new Bliss();
app.engine('.bliss',function(path,options,fn){
fn(null,bliss.render(path, options));
});
Then you call it like this:
exports.index = function(req, res){
res.render('user.bliss', { title: 'Express' });
};
You need a file called user.bliss under the views directory
I use it like this in my app:
var Bliss = require('bliss');
var bliss = new Bliss();
app.get('/', function (req, res) {
res.send(bliss.render('./app/views/layout','title'));
});