post.js
This file
Path
examples/route-separation/post.js
13 lines · 292 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
1234567891011121314'use strict'
// Fake posts database
var posts = [ { title: 'Foo', body: 'some foo bar' }, { title: 'Foo bar', body: 'more foo bar' }, { title: 'Foo bar baz', body: 'more foo bar baz' }];
exports.list = function(req, res){ res.render('posts', { title: 'Posts', posts: posts });};