Skip to content
Browse files

Merge branch 'master' of github.com:corpix/express-errors

  • Loading branch information...
2 parents 2fe8145 + 60c6ee3 commit 967508618a6b039e2ac5c974de0480178a04ad3c @corpix committed Mar 4, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 readme.md
View
10 readme.md
@@ -15,17 +15,17 @@ Provides easy access to common http errors for express e.g.
You need create `views/errors` directory and add 401,403,404 error views.
```javascript
- var errors = require('express-errors');
-
- errors.bind(app, { layout: false });
-
app.get('/400', function(req, res, next){
next(errors.BadRequest); // You will get "bad request" error
});
app.get('/500', function(req, res, next){
next(new Error('Something went wrong :(')); // You will get "Internal server error" error
- })
+ });
+
+ var errors = require('express-errors');
+
+ errors.bind(app, { layout: false }); // Important! Call it after all routes ready
```
#### Options

0 comments on commit 9675086

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