a server side mustache.js example using node.js
Posted
by onecoder4u
on Stack Overflow
See other posts from Stack Overflow
or by onecoder4u
Published on 2010-03-22T15:26:51Z
Indexed on
2010/04/29
10:47 UTC
Read the original article
Hit count: 692
node.js
|serverside-javascript
I'm looking for an example using mustache.js with node.js
here is my example but it is not working. Mustache is undefined. I'm using Mustache.js 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);
© Stack Overflow or respective owner