From 557c59c14c44072febf04b4d580eb540796376a7 Mon Sep 17 00:00:00 2001 From: Wellerson Date: Sat, 27 Jul 2019 23:07:36 -0300 Subject: [PATCH] Update README.md --- README.md | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index df4f0ef..e9b28bf 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,6 @@

- -

Backend-diff

@@ -28,6 +19,25 @@ - To install project dependency: `yarn install` - After the installation of the dependencies `yarn start` in the default directory +## Routes + +#### Login and create user +- `POST` => `/api/login` return -> `TOKEN` +- `POST` => `/api/createUser` return -> `status 200` + +#### Articles +- `GET` => `/api/articles` return -> `json articles` +- `GET` => `/api/article/:id` return -> `json one article` +- `POST` => `/api/article` return -> `status 200 = create one article` +- `DELETE` => `/api/article/:id` return -> `status 200 = delete one article` +- `PUT` => `/api/article/:id` return -> `status 200 = update one article` + +#### Comments +- `GET` => `/api/comment/:idArticle` return -> `json comments of an article` +- `POST` => `/api/comment` return -> `status 200 = create one comments` +- `DELETE` => `/api/comment/:id` return -> `status 200 = delete one article` +- `PUT` => `/api/comment` return -> `status 200 = update one article` + ## Stack used [NodeJS](https://nodejs.org/en/)