Support http/2 with nginx server on local development.
- Clone this repository and
cdinto it
git clone https://github.com/superiorlu/local-http2.git
cd local-http2- Run the script to create certificates:
sh cert.sh- Trust certificates
- macOS:
sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain certs/server.crt- Ubuntu:
sudo cp certs/server.crt /usr/local/share/ca-certificates/server.crt
sudo update-ca-certificates- Build Image
docker build -t mynginx .- Run nginx server
docker run --rm --name mynginx -p 80:80 -p 443:443 -v $(pwd)/html:/usr/share/nginx/html -d mynginxMIT License. See LICENSE for details.
