I'm looking for an example using Mustachejs
with Nodejs
here is my example but it is not working. Mustache
is undefined.
I'm using Mustachejs from the master branch.
var sys = require('sys');
var m = require("./mustache");
var view = {
title: "Joe",
calc: function() {
return 2 + 4;
}
};
var template = "{{title}} spends {{calc}}";
var html = Mustache().to_html(template, view);
sys.puts(html);