Quick Start

thomaslee edited this page Sep 14, 2010 · 1 revision
Clone this wiki locally

Get the code

$ git clone http://github.com/shinetech/jazz.git jazz

Write the template

$ echo "Hello, {name}" >hello.jazz

Write the node program

$ cat >hello.js <<EOF
var jazz = require("./jazz");
var fs = require("fs");
var sys = require("sys");
fs.readFile("hello.jazz", "utf8", function(err, data) {
  var template = jazz.compile(data);
  var args = {name: "User"};
  template.eval(args, function(data) { sys.puts(data); });
});
EOF

Run node!

$ node hello.js