Skip to content

Instantly share code, notes, and snippets.

@zackify
Last active October 14, 2019 20:50
Show Gist options
  • Save zackify/3deee3d6af7268f7edfef542ae6fab87 to your computer and use it in GitHub Desktop.
Save zackify/3deee3d6af7268f7edfef542ae6fab87 to your computer and use it in GitHub Desktop.
Create cert for webpack in one command, mac
"create-cert": "bash -c \"openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout config/server.key -out config/server.crt -subj \"/C=US/ST=Nevada/L=test/O=test/OU=Software/CN=localhost\" -extensions san -config <(echo '[req]'; echo 'distinguished_name=req'; echo '[san]'; echo 'subjectAltName=DNS:localhost,IP:127.0.0.1') && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain config/server.crt\"",

@zackify
Copy link
Author

zackify commented Oct 14, 2019

Thanks! How did you even find this gist though? Haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment