Permalink
Browse files

Add Express 3.x example.

  • Loading branch information...
1 parent 658ca7a commit 6e32475bbacdebbc3610a6308913b777a970b42f @jaredhanson committed Jul 18, 2012
Showing with 27 additions and 0 deletions.
  1. +13 −0 examples/express3/app.js
  2. +8 −0 examples/express3/package.json
  3. +6 −0 examples/express3/views/index.ltxb
@@ -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);
@@ -0,0 +1,8 @@
+{
+ "name": "ltxb-example",
+ "version": "0.0.0",
+ "dependencies": {
+ "express": "3.x.x",
+ "ltxb": "0.x.x"
+ }
+}
@@ -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.