Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poster

📚 Creating and Testing APIs with Cypress

Learning to develop RESTful APIs efficiently using Node.js and Express, integrating MongoDB as the database, and automating the entire end-to-end testing process with Cypress.

🛠️ What I Learned in API Development:

Building RESTful APIs with Node.js and Express, structuring routes, and implementing basic CRUD operations.

🗃️ Database

Learned how to connect the application to MongoDB using Mongoose, as well as model and manipulate data through schemas.

🔍 Testing APIs with Cypress

ACreated tests for each API endpoint, focusing on CRUD operations. Explored techniques to simulate and validate API responses.

Tools Used:

  1. Node.js (versão 20.x LTS)
  2. Visual Studio Code
  3. Windows Terminal
  4. Git Bash

Project Prompt:

Develop a RESTful API in Node.js for a book registration system. The API must include the following features:

📌 Book Registration: Allow users to register books by providing title, author, publisher, publication year, and number of pages. All fields are required. 📌 List Books: Implement an endpoint to list all registered books, returning all their details. 📌 Get Book by ID: Create an endpoint to retrieve a specific book by its ID. 📌 Delete Book: Implement an endpoint to remove a book from the system using its ID. 📌 Database: Use MongoDB as the database.

Technical Requirements:

✅ Use Express.js to manage API routes. ✅ Use Mongoose for data modeling and MongoDB integration. ✅ Include error handling and proper validations for all endpoints. ✅ Add comments in the code to explain key parts of the implementation.

Running the API 🚀

  1. Clone the repository and install dependencies:
npm install
  1. To start the API, run:
npm start

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages