Flexible
Flexible
Customize endpoints with configuration based features and hapi plugins.
Powerful
Powerful
Relational structure built into NoSQL documents based on mongoose schemas.
Efficient
Efficient
Less time with boilerplate functionality and more time building awesome APIs!
What does it do?
rest-hapi uses mongoose schemas to generate CRUD and association REST API endpoints on a hapi server. Think LoopBack but for hapi.
Why?
We love the hapi framework and its style of modularity and configuration over code. We also love writing DRY code and leveraging tools that help go from idea to MVP as quickly as possible. rest-hapi aims to achieve this as an easy to use hapi plugin. Generating endpoints allows for a rich set of configurable features such as:
Search, sort, filter, paginate, and embed associated data.
http get :8080/user \$limit==2 \$sort==email \$embed==role
(Using httpie)
Query parameter, header, payload, and response validation using joi.
Swagger docs provide a UI for your endpoints so you can easily interact with your data.
Try it out!
Check out the demo project or click the button below to play with the live demo.