sholladay / pogo

Server framework for Deno
Mozilla Public License 2.0
482 stars 33 forks source link

Pre handlers for routes #36

Closed sojohnnysaid closed 4 years ago

sojohnnysaid commented 4 years ago

will 'pre' be implemented or does deno have a better way to order actions that happen within the handler?

sholladay commented 4 years ago

I would accept a high quality PR for hapi's pre feature. That said, I've never needed or used it myself, so I personally have no plans to work on it anytime soon. Instead, I just call the "pre" methods directly in the handler itself, which is more explicit and about the same amount of code, sometimes even fewer lines because there's no need for an array.