Skip to content

Instantly share code, notes, and snippets.

@nathanclevenger
Created September 28, 2022 19:14
Show Gist options
  • Save nathanclevenger/db797a941a3bfab323471db4f5f50083 to your computer and use it in GitHub Desktop.
Save nathanclevenger/db797a941a3bfab323471db4f5f50083 to your computer and use it in GitHub Desktop.
workerd with TLS config
const config :Workerd.Config = (
services = [
(name = "site-worker", worker = .siteWorker),
],
sockets = [
(name = "https", address = "*:443", https = (tlsOptions = .tlsOptions), service = "site-worker")
],
);
const tlsOptions :Workerd.TlsOptions = (
keypair = (
privateKey = embed "tls/key.pem",
certificateChain = embed "tls/cert.pem"
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment