Last active
April 17, 2022 17:45
-
-
Save tangoabcdelta/3c08655831c5a33b46fc6c1a0664612d to your computer and use it in GitHub Desktop.
run localhost server in 'https'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a self signed certificate for localhost | |
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 | |
openssl rsa -passin pass:x -in server.pass.key -out server.key | |
# writing RSA key | |
rm server.pass.key | |
openssl req -new -key server.key -out server.csr | |
# Country Name (2 letter code) [AU]:IN | |
# State or Province Name (full name) [Some-State]:Karnataka | |
# Company Name, City and Email | |
# A challenge password []: | |
openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt | |
# Alternative | |
# create a self signed certificate for localhost | |
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install webpack-dev-server | |
npm i -g webpack-dev-server | |
# start webpack-dev-server with https | |
webpack-dev-server --https |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment