OOrveth

Documentation

HTTPS

TLS helpers live in @orveth/https — the core HTTP runtime stays plain HTTP.

Load certificates through @orveth/https and start an HTTPS listener with the same Orveth application instance.

https.ts
import { Orveth } from "orveth";
import { listenHttps, readTlsFilePair } from "@orveth/https";

const app = new Orveth();

const tls = await readTlsFilePair({
  certPath: process.env.TLS_CERT_PATH!,
  keyPath: process.env.TLS_KEY_PATH!,
});

await listenHttps(app, 443, tls);