Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

serveTLS

import { serveTLS } from "https://raw.githubusercontent.com/lucacasonato/deno-fetchevent/master/mod.ts";

Start an HTTPS server with given options

const options = {
  hostname: "localhost",
  port: 443,
  certFile: "./path/to/localhost.crt",
  keyFile: "./path/to/localhost.key",
};
for await (const event of serveTLS(options)) {
  event.respondWith(Response.redirect("https://deno.land", 303));
}
function serveTLS(options: HTTPSOptions): Server;
§
serveTLS(options: HTTPSOptions): Server
[src]

§Parameters

§

Server configuration

§Return Type

§

Async iterable server instance for incoming events