This project demonstrates how different layers of a web application communicate:
Frontend (HTML/JS) → Backend API (Express) → Database (SQLite)
↓ ↓ ↓
User clicks API processes Data stored/
button request retrieved
- Frontend (
public/index.html): Simple web interface - Backend API (
server.js): Express server with REST endpoints - Database (
database.db): SQLite database for data persistence
- Start the server:
npm start - Open browser to
http://localhost:3000 - Watch the console logs to see server-to-server communication
- Click "Add User" → Frontend sends POST to
/api/users→ Backend saves to database - Click "Get Users" → Frontend sends GET to
/api/users→ Backend queries database - All communication is logged with timestamps and details