Skip to content
Browse files

lastRoute option to disable app.use(errors.NotFound)

  • Loading branch information...
1 parent 500c307 commit 2d7ff4c6e687d70953d6801327c3405bdab63a39 @corpix committed Jan 22, 2012
Showing with 6 additions and 4 deletions.
  1. +5 −3 index.js
  2. +1 −1 package.json
View
8 index.js
@@ -23,9 +23,11 @@ ex.define = function(opts){
ex.bind = function(app, opts){
- app.use(function(req, res, next){
- next(ex.NotFound);
- });
+ if(!opts.lastRoute) {
+ app.use(function(req, res, next){
+ next(ex.NotFound);
+ });
+ }
app.error(function(err, req, res, next){
if(!err.name || err.name == 'Error' || !ex.hasOwnProperty(err.name)){
View
2 package.json
@@ -2,7 +2,7 @@
"author": "Corpix <me@corpix.ru> (http://corpix.ru)",
"name": "express-errors",
"description": "Error handler",
- "version": "0.0.7",
+ "version": "0.0.8",
"repository": {
"type": "git",
"url": "git://github.com/corpix/express-errors.git"

0 comments on commit 2d7ff4c

Please sign in to comment.
Something went wrong with that request. Please try again.