Skip to content

Express Routing & Connected API

all1124 edited this page Oct 21, 2019 · 3 revisions

Express Routing & Connected API

  • Routing refers to how an application’s endpoints (URIs) respond to client requests
  • You define routing using methods of the Express app object that correspond to HTTP methods
  • The application “listens” for requests that match the specified route(s) and method(s), and when it detects a match, it calls the specified callback function
  • Route paths, in combination with a request method, define the endpoints at which requests can be made
    • Route paths can be strings, string patterns, or regular expressions
      • The characters ?, +, *, and () are subsets of their regular expression counterparts
      • The hyphen (-) and the dot (.) are interpreted literally by string-based paths

Clone this wiki locally