Route
ELI5 — The Vibe Check
A route is like a road sign that tells incoming requests where to go. When a request comes in for '/users', the router looks at its signs and says 'ah, that goes to the users controller.' Routes map URLs to code.
Real Talk
A route defines the mapping between an HTTP method + URL path and the handler function that processes the request. Routes are declared in a router and determine how the application responds to different URL patterns.
Show Me The Code
app.get('/users', getAllUsers);
app.post('/users', createUser);
app.delete('/users/:id', deleteUser);
When You'll Hear This
"Add a route for the new dashboard page." / "The route is hitting the wrong controller."
Related Terms
Controller
A controller is the manager who actually handles your request after it passes through security.
Endpoint
An endpoint is a specific URL that your API listens on for requests.
Middleware
Middleware is like a security checkpoint at an airport.
Router
The router is the traffic cop of your backend.