File: post.js

package info (click to toggle)
node-express 4.1.1~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,016 kB
  • ctags: 447
  • sloc: makefile: 44; sh: 11
file content (11 lines) | stat: -rw-r--r-- 278 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
// 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 });
};