Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
update example: basic
Browse files Browse the repository at this point in the history
  • Loading branch information
paularmstrong committed Aug 5, 2013
1 parent 22f219a commit 393033e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/basic/server.js
@@ -1,13 +1,9 @@
var http = require('http'),
swig = require(__dirname + '/../../index');

swig.init({
root: __dirname
});

http.createServer(function (req, res) {
var tmpl = swig.compileFile('page.html'),
renderedHtml = tmpl.render({
var tmpl = swig.compileFile(__dirname + '/page.html'),
renderedHtml = tmpl({
people: [
{ name: 'Paul', age: 28 },
{ name: 'Jane', age: 26 },
Expand Down

0 comments on commit 393033e

Please sign in to comment.