Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/ext/net/lib.deno_net.d.ts>Deno.listenTls

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.listenTls
allow-net
import { Deno } from "https://deno.land/x/deno@v1.27.1/ext/net/lib.deno_net.d.ts";
const { listenTls } = Deno;

Listen announces on the local transport address over TLS (transport layer security).

const lstnr = Deno.listenTls({ port: 443, certFile: "./server.crt", keyFile: "./server.key" });

Requires allow-net permission.