Express REST API
objects in object-oriented programming
class declarations are not hoisted
A constructor is a special method that is used to create and initialize objects based on a blueprint called a class. In JavaScript, “this” is a special keyword that refers to the current object being accessed or used within a function or method. It allows us to refer to the object’s own properties and methods.
the process of determining how an incoming HTTP request should be handled based on the requested URL path and HTTP method. It involves defining the endpoints or routes of an application and specifying the corresponding actions or middleware functions to be executed when a specific route is matched.
The route path defines the URL pattern that a specific route should match. The route method, also known as the HTTP method or verb, represents the type of operation that the client wants to perform on a resource.
It is typically used when you want to execute multiple middleware functions sequentially or when you want to pass control to the next route handler.it is essential to call next() at the appropriate time to pass control to the next middleware or route handler. Failing to call next() will result in the request-response cycle being stuck, and subsequent middleware or route handlers will not be executed.
a feature provided by the Express.js framework that allows you to create modular, mountable sets of routes. It provides a way to organize and separate different parts of your application’s routes into reusable components.
create an instance of the router using the express.Router() method
used to perform operations on the request and response objects in the middle of the request-response cycle for a specific route. It allows you to add additional functionality or logic to your routes, such as authentication, data validation, logging, error handling, and more.
## What are your learning goals after reading and reviewing the class README?
I want to understand routing more.