⚡ This is the AMP version of this page. View full version

Routing

Published: 3/21/2026 | Updated: 8/28/2025

Mapping URL parameters to server side logic

Types of Routes

  1. Static Routes
    • Constant paths without variables (e.g., /api/books).
    • Always handle the same type of data or response pattern, regardless of input.
  2. Dynamic Routes
    • Include variable parameters, often denoted with a colon (e.g., /api/users/:id).
    • The variable part is called a path parameter or route parameter, allowing requests like fetching a specific user by ID.

Query Parameters

Nested Routes

Route Versioning and Deprecation

Catch-All Route