1. Node.js v18.18.0 Documentation
HTTPS Module: "The https module provides an implementation of the TLS/SSL protocol for Node.js. The API of https is very similar to that of http." The documentation further provides a direct example: const https = require('node:https'); ... https.createServer(options
(req
res) => { ... });
Source: Official Node.js Documentation
https module API. Section: https.createServer(options[
requestListener]).
2. Node.js v18.18.0 Documentation
HTTP Module: "To use the HTTP server and client
one must require('node:http')." This module is explicitly for the unencrypted HTTP protocol.
Source: Official Node.js Documentation
http module API.
3. Node.js v18.18.0 Documentation
TLS (Transport Layer Security) Module: "The node:tls module provides an implementation of the Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols... It provides a stream-based API for secure communication." This shows it is a lower-level protocol implementation
not the specific API for an HTTPS server.
Source: Official Node.js Documentation
tls module API.