An open API service indexing awesome lists of open source software.

https://github.com/bdmostafa/contact-app-restapi

Contact Listing App using restAPI. I have used four most using methods such as GET, POST, PUT, DELETE here with my own built HTTP server library.
https://github.com/bdmostafa/contact-app-restapi

babel es6-modules html-css-javascript http-server javascript json-api json-server rest-api webpack webpack-boilerplate

Last synced: 16 days ago
JSON representation

Contact Listing App using restAPI. I have used four most using methods such as GET, POST, PUT, DELETE here with my own built HTTP server library.

Awesome Lists containing this project

README

        

#Contact App with REST API

https://github.com/typicode/json-server#getting-started

npm install -g json-server

json-server --watch db.json

http.js library

REST API
GET, POST, PUT, DELETE

Request- special format
GET domain(localhost:3000)/contacts
GET /contacts/:id(special contact)
POST /contacts
PUT /contacts/:id(special contact)
DELETE /contacts/:id(special contact)

add script on package.json "json:server": "json-server --watch api/db.json"

run json server and project live in different port

instantiate http and export http
import to index.js from http.js

getContacts function executes when DOM loaded
UI section executes

Show contacts, delete contacts, edit contacts, update contacts from the server with the help of restAPI

Working with Form data and populating DOM

Changing state when update contacts

showing meaningful messages in application as alert box