https
serve https locally#
Create a certificate
bashopenssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout ~/git/key.pem -out ~/git/cert.pem
Current directory:
bashnpx http-server -S --cors -C ~/git/cert.pem -K ~/git/key.pem -o --port 3001
A specific directory:
bashnpx http-server my-directory -S --cors -C ~/git/cert.pem -K ~/git/key.pem -o --port 3001