json-api
json-api copied to clipboard
Add strategy for hapi
I wonder if it would also be possible to implement a strategy for hapi or if there is already a solution available.
Adding a hapi strategy should be pretty easy, but I don't have time to work on it personally right now. If you want to take a crack at it, using the express and koa strategies as guides, I'm happy to answer any questions.
Thanks, I created it based on the express strategy and it works so far.
It was indeed relatively simple, but I am not really happy with my solution. For example, I had a problem with parsing the body, because it was already been parsed by hapi. My solution was to add another argument to the buildRequestObject
function and another if-statement.
I don't know how to do it better yet. Should I create a pull request anyway?
Glad you got it working. And yeah, please create a pull request and I'll take a look!
Any news on the Hapi strategy PR @twbach? Thanks!