Hapi offers a great server-side HTTP abstraction with a broad ecosystem of plugins and documentation. Combined with the availability of great community maintained typing definitions, hapi seems like a sure bet!
Most of what this library offers sits on top of hapi and as such, I make every effort to ensure the standard hapi documentation continues to apply. Hapi offers a lot already, so where possible, protoculture-hapi integrates - but everywhere else, it stays out of the way.
Like many pure JS libraries, hapi does not natively feature any kind of dependency injection. The nice thing is that hapi is so well factored, setting up dependency injection is straightforward.
All you have to do is bind routes and define handlers either as the regular hapi route structure, or using
Route instances which is where the real
Because hapi is callback based, it's easy for protoculture-hapi to bootstrap asynchronous request handlers. That means all your handlers can now be async!
Protoculture-hapi is created by Alexander Trauzzi and is available under the Apache 2.0 license.
Created as per this github ticket!
I chose hapi as the first http library to integrate protoculture with for a number of reasons. First obviously is that it has a great track record and list of ongoing supporters. Second is that I've read a lot of Eran Hammer's writing and social media activity and like what he contributes to the various development communities.
Thirdly, any developer who is also a John K. fan is pretty much obligated to try hapi!
Head over to the main protoculture repository to learn more!