KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
hapi-harvester
★ 14
Open GitHub ↗
A JSONAPI 1.0 plugin for Hapi.
Download README (.md)
Explore Similar Repositories
khotkeys
:
Trigger actions when certain keys are pressed
shorturl.cr
:
A tiny library to use URL shortening services
Tube-DL
:
Download videos from many of the most popular video streaming sites
IoT
:
IoT Devices and Sensors is a collection of libraries for Windows 10 IoT Core.
zValidate
:
移动端表单验证插件
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
hapi-harvester
?
Download (.md)
# hapi-harvester a JSONAPI 1.0 plugin for Hapi [](https://travis-ci.org/agco/hapi-harvester) [](https://coveralls.io/github/agco/hapi-harvester?branch=develop) ## Overview Harvester is a Hapi plugin which enables you to define [JSONAPI 1.0](http://jsonapi.org) resources in an easy, boilerplate-free manner. ```js // bootstrap a hapi server... and register the plugin server.register( [{ register: harvester, options: { adapter: adapter({ mongodbUrl: 'mongodb://localhost/test', oplogConnectionString: 'mongodb://localhost/local'}) } }], () => { // define a jsonapi schema var brands = { type: 'brands', attributes: { // use Joi to set validation constraints code: Joi.string(), description: Joi.string() } } const hh = server.plugins['hapi-harvester'] // register the routes hh.routes.all(brands).forEach((route) => { server.route(route) }) server.start() }) ``` The code for a more complete server can be found in the [/example](example/index.js) folder. ## Features #### JSON-API 1.0 - [CRUD](http://jsonapi.org/format/#crud) - [Filtering](http://jsonapi.org/format/#fetching-filtering) - [Sorting](http://jsonapi.org/format/#fetching-sorting) - [Pagination](http://jsonapi.org/format/#fetching-pagination) - [Resource Relationships](http://jsonapi.org/format/#document-structure-resource-relationships) - [Inclusion of Linked Resources](http://jsonapi.org/format/#fetching-includes) - [Sparse fieldsets](http://jsonapi.org/format/#fetching-sparse-fieldsets) - [Errors](http://jsonapi.org/format/#errors) #### Other - Extended filter operators : lt, gt, lte, gte - Publish change events through [SSE](http://www.w3.org/TR/eventsource/) ## Guides [Quick Start](docs/QuickStart.md) [Example Server](example/index.js)