Express is a framework built on top of Node's core http (and https when relevant) module.
Express decorates the req (http.IncomingMessage) and res (http.ServerResponse) objects, which are passed to the http.createServer request handler function.
To explain this using code, at a very basic level Express essentially performs the following internally:
const http = require('http') http.createServer((req, res) => { /* add extra methods and properties to req and res */ }))
When we call the express function, it returns an instance that we called app , which represents our Express server.
The app.use function allows us to register middleware, ...