Ptls
Bun

property

Serve.UnixServeOptions.tls

tls?: TLSOptions | TLSOptions[]

Set options for using TLS with this server

const server = Bun.serve({
  fetch: request => new Response("Welcome to Bun!"),
  tls: {
    cert: Bun.file("cert.pem"),
    key: Bun.file("key.pem"),
    ca: [Bun.file("ca1.pem"), Bun.file("ca2.pem")],
  },
});