Skip to content

Commit

Permalink
Updated HTML render to use Jade template.
Browse files Browse the repository at this point in the history
  • Loading branch information
loarabia committed Jul 23, 2011
1 parent ee94959 commit 6712680
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions articles/express-mongodb/app2.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
//root
get('/', function(){
var self = this;
articleProvider.findAll(function(error, docs){
self.render('blogs_index.html.haml', {
locals: {
title: 'Blog',
articles: docs
}
});
})
})
app.get('/', function(req, res){
articleProvider.findAll( function(error,docs){
res.render('blog_index.jade', { locals: {
title: 'Blog',
articles:docs
}
});
})
});

//css
get('/*.css', function(file){
Expand Down

0 comments on commit 6712680

Please sign in to comment.