Last active
May 22, 2020 14:37
-
-
Save Caesar2011/eba3b46e944ef221100f6be79c0e3e7d to your computer and use it in GitHub Desktop.
Deno BadCertificate error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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