1.0.0 • Published 5 years ago
todo-list-npm-util v1.0.0
Hapi v18 CRUD sample
A simple CRUD sample using Hapi v18
What is this repository for?
<<<<<<< HEAD
- This repository is will guide you how to create a simple CRUD by using Hapi v18. You need to install Mongodb and set up the database to exam your result.
Setup
- Go to https://www.mockaroo.com/ to get Database.
- Import it into your mongodb
- Install postman to restAPI
Usage
Use postman to restAPI
Create
- url - http://localhost:3000/customers
- method - post
Body
=======
* This repository is will guide you how to create a simple CRUD by using Hapi v18.
* You need to install Mongodb and set up the database to exam your result.
### Setup
* Go to https://www.mockaroo.com/ to get Database.
* Import it into your mongodb
# Usage
### Create
* url - http://localhost:3000/customers
* method - post
* Body
52ea8fff1a33ffbbbf0bd41ce083b748ee4d93b9 { "id" : '1001', "first_name": 'Loca', "last_name": 'Cika' }
<<<<<<< HEAD ## Read * method: GET * url - http://localhost:3000/customers
Update
- method: PUT
- url - http://localhost:3000/customers/{id}
Body
=======
### Read
* method: GET
* url - http://localhost:3000/customers
### Update
* method: PUT
* url - http://localhost:3000/customers/{id}
* Body
52ea8fff1a33ffbbbf0bd41ce083b748ee4d93b9 { "id": '1001', "first_name": 'ChiChi', "last_name": 'Vegeta' }
<<<<<<< HEAD ## Delete * method - delete * url - http://localhost:3000/customers/{id} ======= ### Delete * method - delete * url - http://localhost:3000/delete/{id} 52ea8fff1a33ffbbbf0bd41ce083b748ee4d93b9
1.0.0
5 years ago