-
-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
Description
The README documentation for errorhandler (under "Simple example") suggests registering the errorhandler like this:
// only use in development
app.use(errorhandler())
}
However, when I launch my express.js app with npm run dev it does not actually execute that line. Other places I look suggest checking your dev environment like this:
if ( app.get('env') === 'development' ) { ...
This does work for me. Which is correct? Are there more addendums to the examples than I realize?
I'm using express@4.21.0.
The documentation in the README is also mirrored to https://expressjs.com/en/resources/middleware/errorhandler.html
Expectations
README documentation should work, as-is.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels