Skip to content

Instantly share code, notes, and snippets.

@sethvincent
Last active July 24, 2017 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sethvincent/96ed85f6182e003f5ab6c829ab4b23b4 to your computer and use it in GitHub Desktop.
Save sethvincent/96ed85f6182e003f5ab6c829ab4b23b4 to your computer and use it in GitHub Desktop.
set up a local ssl cert for development

based on this: https://gist.github.com/jonathantneal/774e4b0b3d4d739cbc53

mkdir some/path/ssl
sudo openssl genrsa -out some/path/ssl/localhost.key 2048
sudo openssl req -new -x509 -key some/path/ssl/localhost.key -out some/path/ssl/localhost.crt -days 3650 -subj /CN=localhost
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain some/path/ssl/localhost.crt

use with budo:

budo index.js --ssl --cert=some/path/ssl/localhost.crt --key=some/path/ssl/localhost.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment