net_server.unref()

server.unref() Calling unref on a server will allow the program to exit if this is the only active server in the event system. If the server is already unrefd calling unref again will have no effect. Returns server.

line event (Readline)

Event: 'line' function (line) {} Emitted whenever the input stream receives an end of line (\n, \r, or \r\n), usually received when the user hits enter, or return. This is a good hook to listen for user input. Example of listening for 'line': rl.on('line', (cmd) => { console.log(`You just typed: ${cmd}`); });

fs.mkdirSync()

fs.mkdirSync(path[, mode]) Synchronous mkdir(2). Returns undefined.

request event (http.Server)

Event: 'request' function (request, response) { } Emitted each time there is a request. Note that there may be multiple requests per connection (in the case of keep-alive connections). request is an instance of http.IncomingMessage and response is an instance of http.ServerResponse.

http.METHODS

http.METHODS <Array> A list of the HTTP methods that are supported by the parser.

http_server.timeout

server.timeout <Number> Default = 120000 (2 minutes) The number of milliseconds of inactivity before a socket is presumed to have timed out. Note that the socket timeout logic is set up on connection, so changing this value only affects new connections to the server, not any existing connections. Set to 0 to disable any kind of automatic timeout behavior on incoming connections.

close event (http.Server)

Event: 'close' function () { } Emitted when the server closes.

process.uptime()

process.uptime() Number of seconds Node.js has been running.

dns.resolve6()

dns.resolve6(hostname, callback) Uses the DNS protocol to resolve a IPv6 addresses (AAAA records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv6 addresses.

net.Server

Class: net.Server This class is used to create a TCP or local server. net.Server is an EventEmitter with the following events: