Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.js #3

Merged
merged 3 commits into from
Apr 7, 2014
Merged

Update index.js #3

merged 3 commits into from
Apr 7, 2014

Conversation

hakubo
Copy link
Contributor

@hakubo hakubo commented Apr 4, 2014

anything against passing there next callback?
this will make it more compatible with middleweres

anything against passing there next callback?
this will make it more compatible with middleweres
@cainus
Copy link
Owner

cainus commented Apr 4, 2014

Do you ever actually call next() in a route handler like that though? Why?

Thanks!

@hakubo
Copy link
Contributor Author

hakubo commented Apr 5, 2014

I want to have one function to handle errors so I can do
next(err) in various places

and than handle it in one place

app.use(function(err, req, res, next){
//handle err
})

@cainus
Copy link
Owner

cainus commented Apr 6, 2014

Alright... good enough reason for me. Can you put a test on it though? Thanks!

@hakubo
Copy link
Contributor Author

hakubo commented Apr 7, 2014

I hope I got it right,
do you see any other valuable tests?

cainus added a commit that referenced this pull request Apr 7, 2014
Allow route to additional take a `next` parameter
@cainus cainus merged commit 32efff5 into cainus:master Apr 7, 2014
@cainus
Copy link
Owner

cainus commented Apr 7, 2014

looks good! thanks!

@cainus
Copy link
Owner

cainus commented Apr 7, 2014

published in 1.0.2

@hakubo hakubo deleted the patch-1 branch April 7, 2014 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants