Skip to content

Commit

Permalink
render bench
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 26, 2012
1 parent 9719b58 commit a169cc7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions support/app.js
Expand Up @@ -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');
Expand Down
3 changes: 2 additions & 1 deletion support/bench
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

node ./support/app &
NODE_ENV=production node ./support/app &
pid=$!

bench() {
Expand All @@ -16,5 +16,6 @@ bench /blog "Mounted Hello World"
bench /json "JSON"
bench /middleware "Middleware"
bench /match "Router"
bench /render "Render"

kill -9 $pid
1 change: 1 addition & 0 deletions support/views/hello.jade
@@ -0,0 +1 @@
p Hello

0 comments on commit a169cc7

Please sign in to comment.