Skip to content

Instantly share code, notes, and snippets.

@Caesar2011
Last active May 22, 2020 14:37
Show Gist options
  • Save Caesar2011/eba3b46e944ef221100f6be79c0e3e7d to your computer and use it in GitHub Desktop.
Save Caesar2011/eba3b46e944ef221100f6be79c0e3e7d to your computer and use it in GitHub Desktop.
Deno BadCertificate error
import { serveTLS } from "https://deno.land/x/[email protected]/http/server.ts";
const options = {
port: 3000,
hostname: "0.0.0.0",
certFile: "./server.cert",
keyFile: "./server.key"
};
const s = serveTLS(options);
for await (const req of s) {
req.respond({body: "Hello World"});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment