Overview
Day 72 focuses on understanding the fundamentals of Express.js routing and learning what a REST API is. Today's work covered creating multiple routes, sending JSON responses, and understanding how API endpoints work.
What I Learned Today
- What routing is in Express.js
- How to create different endpoints (GET, POST, PUT, DELETE)
- What REST API means and why it's used
- How to return JSON data from an API
- How request and response objects work
Key Concepts
Express Routing
- Route handlers respond to specific URL paths
- Methods include app.get, app.post, app.put, app.delete
REST API
- Representational State Transfer
- Uses HTTP methods to perform actions
- Common operations: Create, Read, Update, Delete
Request and Response
- req contains data sent by the client