Skip to content

v-988/APIBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                                                  APIBridge

A full-stack REST API demo. The browser frontend talks to an Express backend over four clean endpoints — GET all, GET one, POST create, DELETE. No frameworks, no build step. License: MIT Node.js


Stack

Layer Tech
Frontend HTML, CSS, Vanilla JS
Backend Node.js + Express 4
Data In-memory JS array
HTTP Client fetch() Web API

Getting Started

# 1. Install dependencies
cd backend && npm install

# 2. Start the server
npm start
# → http://localhost:3001

# 3. Open the frontend
open frontend/index.html

Enter http://localhost:3001 in the base URL field and click Connect.


API Endpoints

Method Route Description
GET /api/products Return all products
GET /api/products/:id Return one product
POST /api/products Create a product
DELETE /api/products/:id Delete a product
GET /api/health Server health check

POST body

{
  "name": "USB-C Hub",
  "category": "Electronics",
  "price": 49.99,
  "stock": true
}

Project Structure

productshelf/
├── backend/
│   ├── server.js       # Express routes + middleware
│   └── package.json
├── frontend/
│   └── index.html      # UI + fetch() calls
├── docs/
│   └── architecture.svg
├── .gitignore
├── LICENSE
└── README.md

System Architecture

APIbridge architecture


Result Preview

result preview

License

MIT

About

A responsive full-stack web application demonstrating frontend and backend communication through REST APIs using Express.js and the Fetch API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors