We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 458a2f6 + 25e39f1 commit 2bda23dCopy full SHA for 2bda23d
templates/express/config/express.js
@@ -25,7 +25,6 @@ module.exports = function(app) {
25
26
app.use(express.static(path.join(config.root, '.tmp')));
27
app.use(express.static(path.join(config.root, 'app')));
28
- app.use(express.errorHandler());
29
app.set('views', config.root + '/app/views');
30
});
31
@@ -60,7 +59,12 @@ module.exports = function(app) {
60
59
app.use(passport.initialize());
61
app.use(passport.session());
62
<% } %>
63
- // Router needs to be last
+ // Router (only error handlers should come after this)
64
app.use(app.router);
65
+
66
+ // Error handler
67
+ app.configure('development', function(){
68
+ app.use(express.errorHandler());
69
+ });
70
};
0 commit comments