Explanation
Express organizes routes and middleware so you can build CRUD APIs with clear HTTP semantics.
Code example
javascriptimport express from "express";
const app = express();
app.use(express.json());
const skills = [{ id: "1", name: "HTTP" }];
app.get("/api/skills", (_req, res) => res.json(skills));
app.post("/api/skills", (req, res) => {
const skill = { id: String(Date.now()), name: req.body.name };
skills.push(skill);
res.status(201).json(skill);
});
app.listen(4000);Helpful resources
Exercise
Build GET list, GET by id, POST, PATCH, and DELETE for a resources collection.
