Permalink
@@ -13,7 +13,9 @@ var express = require('../..')
app.set('view engine', 'jade');
app.set('views', __dirname + '/views');
+app.use(express.logger('dev'));
app.use(express.cookieParser());
+app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(__dirname + '/public'));
@@ -2,9 +2,9 @@
// 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' }
+ { 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){
@@ -11,10 +11,10 @@ a.edit {
opacity: .3;
}
a.edit::before {
- content: '[ ';
+ content: ' [';
}
a.edit::after {
- content: ' ]';
+ content: ']';
}
dt {
font-weight: bold;
@@ -2,8 +2,8 @@
// Fake user database
var users = [
- { name: 'TJ', email: 'tj@vision-media.ca' }
- , { name: 'Tobi', email: 'tobi@vision-media.ca' }
+ { name: 'TJ', email: 'tj@vision-media.ca' },
+ { name: 'Tobi', email: 'tobi@vision-media.ca' }
];
exports.list = function(req, res){
@@ -22,15 +22,15 @@ exports.load = function(req, res, next){
exports.view = function(req, res){
res.render('users/view', {
- title: 'Viewing user ' + req.user.name
- , user: req.user
+ title: 'Viewing user ' + req.user.name,
+ user: req.user
});
};
exports.edit = function(req, res){
res.render('users/edit', {
- title: 'Editing user ' + req.user.name
- , user: req.user
+ title: 'Editing user ' + req.user.name,
+ user: req.user
});
};
@@ -1,7 +1,6 @@
extends ../layout
block content
-
h1 Editing #{user.name}
#user
form(method="post")

0 comments on commit c2fa6cc

Please sign in to comment.