Skip to content

Instantly share code, notes, and snippets.

@huozhi
Created January 16, 2018 03:13
Show Gist options
  • Save huozhi/c290f9f0857e749de7bfa00908128707 to your computer and use it in GitHub Desktop.
Save huozhi/c290f9f0857e749de7bfa00908128707 to your computer and use it in GitHub Desktop.
generate ssl keys for localhost
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
# only enter the Common Name: your ip address or your domain name
@huozhi
Copy link
Author

huozhi commented Jan 16, 2018

# generate your ssl keys in the folder, then you can just use it with `http-server`
hs -S # enable ssl mode

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