-
Notifications
You must be signed in to change notification settings - Fork 3
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
Override resource handlers #3
Comments
Some sort of middleware stack might be best here. Keeping in mind that overriding might not be the goal, but extending/hooking might sometimes be more beneficial. |
@joshuajabbour I think you are right - middleware is probably the way to go - should be trivial to implement pre/post style hooks here. My question is, after |
No, |
Hmm maybe the default handlers become something like this? (req, res, next ) => {
if (typeof next === 'function') {
return next(req, res);
}
// DEFAULT HANDLER LOGIC
} Though I think "next" is always a function, so this may be flawed. |
There should be a way to override the default generated handlers. You should be able to house the resource files in a directory that is discoverable or configurable.
The text was updated successfully, but these errors were encountered: