We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5841440 commit 0116cb3Copy full SHA for 0116cb3
templates/express/config/express.js
@@ -60,7 +60,12 @@ module.exports = function(app) {
60
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
+ if('development' === app.get('env')) {
68
+ app.use(express.errorHandler())
69
+ }
70
});
71
};
0 commit comments