Demo application developed at the request of Yandex Praktikum students. The goal was to demonstrate the difference between PUT and PATCH methods in RESTful API.
If you want to run the application, you can do the following:
git clone
the repository- Run
npm install
- Start application with
npm run start
After this, REST API should be available for calls from Insomnia or Postman at http://localhost:8080
Returns a list of all contact.
Returns one contact for provided phone number.
Creates a new contact. Expects the following JSON body:
{
"firstName" = "...",
"lastName": "...",
"phone": "..."
}
Replaces contact with provided phone number.
The request body is the same as above.
Modifies contact with provided phone number.
The request body is the same as above, but all fields are optional.
- Express 4.17 (documentation)
- Insomnia
- Postman
- Read more about RESTful APIs