Backend for news-explorer-api domain name www.api.explorethenews.students.nomoreparties.site
The user will be able to create a user, login in and out, save and delete articles, and view their saved articles.
- Clone this repo
- Run the dev script
npm run dev
- Use Postman, Insomnia, or even the Thunder Client ext. on VS Code (or any other of your favorites) to test the the endpoints
- Node.js
- Express.js
- Mongodb
201: Created
400: Bad request
404: Not found
403: Forbidden
409: Conflict
401: Unauthorized
Endpoint | Request | Description |
---|---|---|
/signup | POST | The response body should send an email and password { “email”: “[email protected]”, “password”: “12345”,} and if a user is created expect a successful response http status of 201 |
/signin | POST | The response body should send an email and password and a http status of 200 |
/users/me | GET | Return information about an authorized user Content-Type: application/json, Authentication: Bearer “token” |
/users/me | PATCH | Update user info |
/cards | POST | Create a card |
/cards | GET | Return all cards from the database |
This API was created as a part of the Practicum by Yandex curriculum