Skip to content

Commit

Permalink
Add Express 3.x example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Jul 18, 2012
1 parent 658ca7a commit 6e32475
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/express3/app.js
@@ -0,0 +1,13 @@
var express = require('express')
, app = express();

app.configure(function() {
app.set('views', __dirname + '/views');
app.use(express.logger());
});

app.get('/', function(req, res){
res.render('index.ltxb', { name: 'Bruce Wayne', aliases: [ 'The Batman', 'The Dark Knight' ] });
});

app.listen(3000);
8 changes: 8 additions & 0 deletions examples/express3/package.json
@@ -0,0 +1,8 @@
{
"name": "ltxb-example",
"version": "0.0.0",
"dependencies": {
"express": "3.x.x",
"ltxb": "0.x.x"
}
}
6 changes: 6 additions & 0 deletions examples/express3/views/index.ltxb
@@ -0,0 +1,6 @@
xml.n('superhero')
.c('name', { 'primary': 'true' }).t(name).up();

aliases.forEach(function(alias) {
xml.c('alias').t(alias);
});

0 comments on commit 6e32475

Please sign in to comment.