Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function error(err, req, res, next) {
res.send('Internal Server Error');
}

app.get('/', function(req, res){
app.get('/', function () {
// Caught and passed down to the errorHandler middleware
throw new Error('something broke!');
});
Expand Down
4 changes: 2 additions & 2 deletions examples/view-locals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function users(req, res, next) {
})
}

app.get('/middleware', count, users, function(req, res, next){
app.get('/middleware', count, users, function (req, res) {
res.render('index', {
title: 'Users',
count: req.count,
Expand Down Expand Up @@ -99,7 +99,7 @@ function users2(req, res, next) {
})
}

app.get('/middleware-locals', count2, users2, function(req, res, next){
app.get('/middleware-locals', count2, users2, function (req, res) {
// you can see now how we have much less
// to pass to res.render(). If we have
// several routes related to users this
Expand Down
4 changes: 2 additions & 2 deletions examples/web-service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ var userRepos = {
// and simply expose the data

// example: http://localhost:3000/api/users/?api-key=foo
app.get('/api/users', function(req, res, next){
app.get('/api/users', function (req, res) {
res.send(users);
});

// example: http://localhost:3000/api/repos/?api-key=foo
app.get('/api/repos', function(req, res, next){
app.get('/api/repos', function (req, res) {
res.send(repos);
});

Expand Down