Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

render bench

  • Loading branch information...
commit a169cc7119e6aaa448ea095a61884b82fde7f43c 1 parent 9719b58
@tj tj authored
Showing with 10 additions and 1 deletion.
  1. +7 −0 support/app.js
  2. +2 −1  support/bench
  3. +1 −0  support/views/hello.jade
View
7 support/app.js
@@ -9,6 +9,13 @@ var app = express()
, blog = express();
app.use('/blog', blog);
+app.set('views', __dirname + '/views');
+app.set('view engine', 'jade');
+app.locals.self = true;
+
+app.get('/render', function(req, res){
+ res.render('hello');
+});
blog.get('/', function(req, res){
res.send('Hello World\n');
View
3  support/bench
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-node ./support/app &
+NODE_ENV=production node ./support/app &
pid=$!
bench() {
@@ -16,5 +16,6 @@ bench /blog "Mounted Hello World"
bench /json "JSON"
bench /middleware "Middleware"
bench /match "Router"
+bench /render "Render"
kill -9 $pid
View
1  support/views/hello.jade
@@ -0,0 +1 @@
+p Hello
Please sign in to comment.
Something went wrong with that request. Please try again.