Skip to content

Instantly share code, notes, and snippets.

@paulgreg
Created November 9, 2022 15:52
Show Gist options
  • Save paulgreg/304bd061311c0c503849bee4cb1dd16e to your computer and use it in GitHub Desktop.
Save paulgreg/304bd061311c0c503849bee4cb1dd16e to your computer and use it in GitHub Desktop.
Quickly serve a local directory with TLS using http-server (node) & with self signed certificates
#!/bin/bash -v
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -subj '/CN=localhost' -nodes
npx http-server -S .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment