@orveth/https
Load PEM certificate material from disk and start an HTTPS listener backed by an Orveth application.
Exports
readTlsFilePair(paths)— readscert,key, optionalcainto buffers for Node TLS.listenHttps(target, port, tls)— bindshttps.createServerto anOrvethapp or any NodeRequestListener.
Example
import { Orveth } from "@orveth/server";
import { listenHttps, readTlsFilePair } from "@orveth/https";
const app = new Orveth();
app.get("/health", (ctx) => ctx.ok({ ok: true }));
const tls = await readTlsFilePair({
certPath: process.env.TLS_CERT_PATH!,
keyPath: process.env.TLS_KEY_PATH!,
});
await listenHttps(app, Number(process.env.PORT ?? 443), tls);Manual server control
Use app.toRequestListener() from @orveth/server when you need to configure the Node https.Server yourself (custom timeouts, ALPN, etc.).