June 2014
Intermediate to advanced
696 pages
38h 52m
English
The Node.js HTTP Server object provides the fundamental framework to implement HTTP servers. It provides an underlying socket that listens on a port and handles receiving requests and then sending responses out to client connections. While the server is listening, the Node.js application does not end.
The Server object implements EventEmitter and emits the events listed in Table 7.8. As you implement an HTTP server, you need to handle at least some or all of these events. For example, at a minimum, you need an event handler to handle the request event that is triggered when a client request is received.
Table 7.8 Events ...
Read now
Unlock full access