LOGBOOK

HELP

Quiz Entry - updated: 2026.06.20

How do you define route parameters in Express.js?

Mark a dynamic segment with the colon syntax :paramName in the route path, then read it from req.params.

app.get('/users/:userId', (req, res) => {
  const id = req.params.userId;
  // Find user by id
});

Multiple parameters: /users/:userId/orders/:orderId

Access via: req.params.userId, req.params.orderId

From Quiz: WEBT / Backend Integration | Updated: Jun 20, 2026