The Talkers API is a simple REST API designed for managing a collection of talkers. It provides basic CRUD (Create, Read, Update, Delete) operations to interact with talker data. This API is ideal for applications that require a backend system to handle speaker profiles, interviews, or any scenario where managing talkers' information is essential.
Table of Contents
To run the project, you will need to have Node.js and Docker installed on your machine.
- Clone the repository
git clone git@github.com:gabrielmoisesa/talkers-api.git
- Navigate to the project folder
cd talkers-api
- Start the containers
docker-compose up -d
- Access the container bash
docker exec -it talker_manager bash
- Run the application
npm start
# with nodemon
npm run dev
GET /talker
- Get all talkers
GET /talker/:id
- Get talker by id
GET /talker/db
- Get talkers from mysql database
GET /talker?q=${name}&rate=${rate}&date=${date}
- Get talkers by query params
POST /talker
- Create a new talker
PUT /talker/:id
- Update talker by id
PATCH /talker/rate/:id
- Update talker rate by id
DELETE /talker/:id
- Delete talker by id
POST /login
- Login
- Node.js
- Express.js
- MySQL 2
The development of the project was based in requirements and testing by Trybe course.
Requirements
-
1. Create the GET /talker endpoint
-
2. Create the GET /talker/:id endpoint
-
3. Create the POST /login endpoint
-
4. Add validations for the /login endpoint
-
5. Create the POST /talker endpoint
-
6. Create the PUT /talker/:id endpoint
-
7. Create the DELETE /talker/:id endpoint
-
8. Create the GET /talker/search?q=searchTerm endpoint
-
9. Create the minRate=rateNumber query parameter in the GET /talker/search endpoint
-
10. Create the query parameter date=watchedDate in the GET /talker/search endpoint
-
11. Create the PATCH /talker/rate/:id endpoint
-
12. Create the GET /talker/db endpoint
Testing (by Trybe)
The project was developed based on tests and have all the cases covered.
# Access the container bash
docker exec -it talker_manager bash
# Run tests
npm test
# Run a specific test
npm test 01
# Run lint
npm run lint
- Trybe - Configuration and testing