A simple backend project with Express by Emilio Hernando and Manoel Castro This project allows to manage advices and recommendations for travel experiences
- Clone or download the repository
- Use npm install to get it working
- Use Postman or another client to make requests, request examples are included
- id
- username *
- password *
- email *
- role *
- creation date
- registration code
- id
- title *
- class *
- location *
- abstract *
- content *
- photo *
- creation_date
- user_id *
- recommendation_id *
- score *
- creation_date
- id
- content *
- recommendation_id *
- user_id *
- creation_date
-
Get a list of recommendations filtered and ordered by the following query params
-
Query params:
- location: filter by location - class: filter by class - orderByVotes: order by average rating
-
Return: a list of recommendations following the query params
-
Get the whole recommendation by id
-
Path params:
- idEntry: el id del artículo
-
Return: the whole recommendation identified with the path param
-
User login
-
Body:
- username - password
-
Return: JWT for the authenticated user
-
Create new user
-
Body:
- email - password - username - role
-
Return: confirmation user registered
-
Create a recommendation
-
Body:
- title - class - location - abstract - content - photo
-
Return: url and confirmation
-
Vote for a recommendation
-
Query params:
- rating
-
Return: confirmation of the vote
-
Write a comment for a recommendation
-
Body:
- content
-
Return: confirmation