Skip to content

iAmUsmanAwan/API_Handling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 API Handling App

🌟 Overview

This project is a demonstration of my expertise in building full-stack applications using modern technologies. The app consists of a separate frontend (React) and backend (Node.js with Express.js) to showcase API handling, data fetching, and efficient state management.

✨ Features

  • 🛠️ Backend API with Express.js: Provides product data with search functionality.
  • 🎨 Frontend with React: Fetches data from the backend and implements a search feature.
  • 🔗 Axios for API Calls: Ensures efficient communication between frontend and backend.
  • Loading and Error Handling: Implements loading states and error messages for a better user experience.
  • 🚦 AbortController for Request Cancellation: Prevents unnecessary API calls and handles request race conditions.

🛠️ Technologies Used

  • Backend: Node.js, Express.js
  • 🎭 Frontend: React, Axios
  • 🔄 State Management: React Hooks (useState, useEffect)

🏁 Getting Started

📥 Clone the Repository

git clone https://github.com/iAmUsmanAwan/API_Handling.git
cd API_Handling

🔧 Backend Setup

cd backend
npm install
npm start
  • The server runs on http://localhost:3000/api/products

💻 Frontend Setup

cd frontend
npm install
npm run dev
  • The app runs on http://localhost:5173

📌 API Endpoints

  • 📜 Get All Products: GET /api/products
  • 🔍 Search Products: GET /api/products?search={query}

🤝 Contribute & Support

If you find this project helpful, please consider starring the repository ⭐ and following me on GitHub! 🚀

About

Handling API's as they are handled in the production. Dealing with the race condition, and improving the efficiency of the APIs.

Topics

Resources

Stars

Watchers

Forks

Contributors