@orveth/https
v0.1.1
Published
TLS PEM loading and HTTPS listeners for Node.js services.
Maintainers
Readme
@orveth/https
Load PEM TLS material from disk and bind an HTTPS server to an Orveth app or any Node RequestListener.
Install
npm install @orveth/https @orveth/serverUsage
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, 443, tls);Pass app.toRequestListener() instead of app when you configure https.createServer yourself.
License
MIT — VLODIA
