Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Express 3.x example.

  • Loading branch information...
commit 6e32475bbacdebbc3610a6308913b777a970b42f 1 parent 658ca7a
@jaredhanson authored
View
13 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);
View
8 examples/express3/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "ltxb-example",
+ "version": "0.0.0",
+ "dependencies": {
+ "express": "3.x.x",
+ "ltxb": "0.x.x"
+ }
+}
View
6 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);
+});
Please sign in to comment.
Something went wrong with that request. Please try again.