Skip to main content
Set the tls key to configure TLS. Both key and cert are required: key is the contents of your private key and cert is the contents of your issued certificate. Use Bun.file() to read them.
server.ts

By default, Bun trusts the Mozilla-curated list of well-known root CAs. To override this list, pass an array of certificates as ca.
server.ts