hmu.ai
Back to Developer Dictionary
Developer Dictionary

Route

Definition

A rule for mapping a URL to a specific function or resource.

Deep Dive

In the context of web development, a route defines a rule for how an application responds to a client request to a particular endpoint, which is essentially a specific URL path. It maps a URL pattern to a specific handler function, controller action, or resource within the application's backend (server-side routing) or frontend (client-side routing in Single Page Applications). Routes are fundamental to defining the application's navigational structure and how users access different parts of a website or web service.

Examples & Use Cases

  • 1A web server configured to direct requests for `/products` to a function that retrieves and displays a list of all products
  • 2A client-side router in a JavaScript application changing the displayed component from a home page to a user profile page when the URL changes from `/` to `/profile`.

Related Terms

URLEndpointController

Part of the hmu.ai extensive business and technology library.