
The stuff that makes up Express
A good thing about Express is that there are only three core components to it, which makes it relatively easy to know a lot about Express, if not master it entirely. In this section, I will give a brief introduction about each of the core Express components, so that you are not left disoriented when you come across them in the coming chapters.
The application object
The application object is an instance of Express, conventionally represented by the variable named app
. This is the main object of your Express app and the bulk of the functionality is built on it.
This is how you create an instance of the Express module:
var express = require('express'); var app = new express();
The following is a brief description of all the properties and methods available on the application object:

The request object
The HTTP request object is created when a client makes a request to the Express app. The object is conventionally represented by a variable named req
, which contains a number of properties and methods related to the current request.
The following table lists all the properties and methods of the req
object and provides a brief description of them:

The response object
The response object is created along with the request object, and is conventionally represented by a variable named res
. While it may sound a little strange that both of them should be created together, it is a necessity to give all the middlewares a chance to work on the request and the response object, before passing the control to the next middleware.
The following is a table of properties and methods on the response object:

