Skip to content

Leonelcode/rest-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

Clone this repository, and run the install command (preferrably Yarn):

yarn install

// or

npm install

Start the proyect with Yarn or Npm:

yarn start

// or

npm start

Available end-points

GET /reviews

Gets all the reviews.

POST /reviews

Creates a review (be sure you are sending the headers via your library).

Headers

Content-Type : application/json

Request body (raw)

{
    "name": "Roy Vargas",
    "rating": "2",
    "date": "10/11/2020",
    "comment": "Estos Cinammon Rolls son excelentes."
}

PUT /reviews/:id

Updates a review. The JSON object must be passed in the request body.

Headers

Content-Type : application/json

Request body (raw)

{
    "name": "Roy Vargas",
    "rating": "2",
    "date": "10/11/2020",
    "comment": "Estos Cinammon Rolls son excelentes."
}

DELETE /reviews/:id

Removes an review given its id.

Authors

About

Basic REST API server, stores reviews using JSON as DB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors