(My opinionated view as an Express developer)
Check this post: http://matt-harrison.com/moving-from-express-to-hapi-js/ and how to use Hapi plugins: https://gist.github.com/hueniverse/f01faf422eb038d87d57 written by Hapi creator Eran Hammer.
-
Creator Eran Hammer seems to be a smart guy and active in Hapi development
-
Stronger and bigger core ecosystem
Meaning that the core has already solved error handling, logging etc. and they play nicely together.
Very active development, good release notes and conventions.
Plugins: http://hapijs.com/plugins
-
Wise defaults
You don't need to manually setup JSON parser etc as in Express.
IMO Hapi seems to do just enough but not too much for API backend dev.
-
Configuration over code provides nice features
You can e.g. generate swagger API documentation from the route configuration. (https://github.com/glennjones/hapi-swagger)
On the other hand you could form your Express code in the exact same way to accomplish the same benefit.
-
Core modules are good quality
All option objects are validated with Joi and do not accept incorrect conf.
-
Documentation in the core plugins are not always good
-
Configuration over code
I don't have an example yet where this would be a bad thing but do you remember grunt, the frontend build tool? I had some cases where its configuration model wasn't rich enough.
-
Not as big community
.. but big enough.
-
Not as simple as Express
-
Separate code to logical pieces in the hapi app architecture
See e.g. this Express architecture: https://github.com/kimmobrunfeldt/express-example similar can and would be recommended to use with Hapi
-
Made for Walmart, Evan was hired there and this framework was created
-
Both are good, they just have a bit different approaches.