npm.io
1.0.0 • Published 7 years ago

todo-list-npm-util

Licence
ISC
Version
1.0.0
Deps
12
Size
9 kB
Vulns
8
Weekly
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

Usage

Use postman to restAPI

Create

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

Update

>>>>>>> 52ea8fff1a33ffbbbf0bd41ce083b748ee4d93b9
{
    "id": '1001',
    "first_name": 'ChiChi',
    "last_name": 'Vegeta'
}

<<<<<<< HEAD

Delete

Delete

52ea8fff1a33ffbbbf0bd41ce083b748ee4d93b9

Keywords