An example of a Restful API built using hapi.js v8.0 for storing a list of tasks.
Check out the demo.
$ git clone git@github.com:rcorral/hapi-restful-api-example.git
$ cd hapi-restful-api-example
$ npm install
$ npm index.js
$ curl -XGET http://localhost:8000/tasks
$ curl -XGET http://localhost:8000/tasks/{id}
$ curl -XPOST http://localhost:8000/tasks \
-H 'Content-Type: application/json' \
-d '{"task": "Play futbol."}'
$ curl -XPUT http://localhost:8000/tasks/{id} \
-H 'Content-Type: application/json' \
-d '{"task": "Play soccer."}'
$ curl -XDELETE http://localhost:8000/tasks/{id}
$ npm test
MIT