Demo.Simpel.Resful.API.mp4
Create the simple RESTFul API using Node.js Natively and Hapi Framework with the specification:
Method | Path | Response Code | Body | Description |
---|---|---|---|---|
POST | /contacts | 201 | JSON | Create new contacts |
GET | /contacts | 200 | JSON | List of contacts |
DELETE | /contacts/:id | 200 | JSON | Delete contacts |
User data structure:
{
"id": "1",
"name": "John Doe",
"email": "john@example.com",
"phone": "1234567890"
}
Server options:
port
: 3000host
: localhost
-
To use any of the scripts in this repository, clone this repostory:
git clone https://github.com/Muhthoriqas/Simple-RESTFul-API.git
-
Go to Simple-RESTFul-API Folder
cd Simple-RESTFul-API
-
Go to native, or hapi, or express folder
cd native
-
Run Server
npm start
If you have any Bash scripts that you would like to share or any improvements to suggest, feel free to contribute to this repository! Fork the repository, make your changes, and submit a pull request.
This repository is licensed under the MIT License. See the LICENSE file for more information.