Skip to content
masterclass Buddy

Node.js · Class

Server

Node.js can create an HTTP server with the built-in node:http module. The server handles requests and sends responses without blocking the main thread.

Last updated

Since
v0.1.90

Syntax

createServer(requestListener); server.listen(port, host, callback);

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • node:http
  • http.createServer
  • http.IncomingMessage
  • http.ServerResponse
  • server.listen
  • server.close

Source: Introduction to Node.js | Node.js Learn. Checked 2026-11-03.