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.
SubscribeRelated
node:httphttp.createServerhttp.IncomingMessagehttp.ServerResponseserver.listenserver.close