node:https
The built-in Node.js module for HTTP over TLS, combining node:http with node:tls.
In more detail
https.createServer({ key, cert }, handler) behaves like an HTTP server whose connections are encrypted. Clients use https.request() or fetch() with https:// URLs, and certificates are verified by default.
Related terms
- node:http — The built-in Node.js module for writing HTTP/1.1 servers and clients, which web frameworks such as Express and Fastify build on.
- node:tls — The built-in Node.js module for TLS connections and settings, used underneath node:https and HTTP/2 over TLS.
- TLS — The encryption that protects data travelling over a network, the S in HTTPS.
Taught in
- TLS & HTTPS Encryption: Certificates & SNI Contexts — Node.js Internals & Backend Services